Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/zeropsio/recipe-scala
Scala Backend + Play on Zerops.
https://github.com/zeropsio/recipe-scala
backend playframework scala zerops zerops-recipe
Last synced: 21 days ago
JSON representation
Scala Backend + Play on Zerops.
- Host: GitHub
- URL: https://github.com/zeropsio/recipe-scala
- Owner: zeropsio
- Created: 2024-09-05T23:20:03.000Z (4 months ago)
- Default Branch: main
- Last Pushed: 2024-11-22T05:08:20.000Z (about 1 month ago)
- Last Synced: 2024-11-29T15:04:14.948Z (23 days ago)
- Topics: backend, playframework, scala, zerops, zerops-recipe
- Language: Scala
- Homepage:
- Size: 46.9 KB
- Stars: 1
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Zerops x Scala
A bare-bones example of a Scala backend using the Play Framework. It provides a lightweight starting point for building web applications with minimal configuration. Zerops makes deploying and running Scala apps, a breeze.
![Scala](https://github.com/zeropsio/recipe-shared-assets/blob/main/covers/svg/cover-scala.svg)
## Deploy on Zerops
You can either click the deploy button to deploy directly on Zerops, or manually copy the [import yaml](https://github.com/zeropsio/recipe-scala/blob/main/zerops-project-import.yml) to the import dialog in the Zerops app.[![Deploy on Zerops](https://github.com/zeropsio/recipe-shared-assets/blob/main/deploy-button/green/deploy-button.svg)](https://app.zerops.io/recipe/scala)
## Recipe features
- Latest version of **Scala** & **JDK** running on **Zerops Ubuntu** Service.
- Latest version of **SBT(Simple build tool)** with **Play** web framework.## Server backend
By default, the project uses the Pekko HTTP Server backend. To switch to the Netty Server backend, enable the `PlayNettyServer` sbt plugin in the `build.sbt` file.
In the `build.sbt` of this project, you'll find a commented line for this setting; simply uncomment it to make the switch.
For more detailed information, refer to the Play Framework [documentation](https://www.playframework.com/documentation/3.0.x/Server).
## Production vs. development
This recipe is ready for production as is, and will scale horizontally by adding more containers in case of high traffic surges. If you want to achieve the highest baseline reliability and resiliace, start with at least two containers (add `minContainers: 2` in recipe YAML in the `app` service section, or change the minimum containers in "Automatic Scaling configuration" section of service detail).
## Changes made over the default installation
If you want to modify your existing Scala backend to efficiently run on Zerops, there are no changes needed in the codebase on top of the standard installation, just add [zerops.yml](https://github.com/zeropsio/recipe-scala/blob/main/zerops.yml) to your repository.
Need help setting your project up? Join [Zerops Discord community](https://discord.com/invite/WDvCZ54).