Simple POC for dockerized HTTP microservice using Scala in a functional programming way.
- JDK 17 (jenv can help)
- SBT
- Docker
- Minikube
- Terraform
SCOPE | TECH |
---|---|
✅ Effects | cats-effect |
✅ Logging | log4cats |
✅ Jdbc (plain, transactions, etc..) | doobie |
✅ Db migration | fly4s |
✅ Http client and server | http4s |
✅ Http route definitions | tapir |
✅ Config | pureconfig |
✅ Json | circe |
✅ Refinement types | refined |
⬜ Unit tests | munit |
⬜ IT tests | testcontainers |
SCOPE | TECH |
---|---|
⬜ Project as template | g8 |
✅ Containerized app | Docker via DockerSbt |
⬜ Containers orchestrator | K8s |
⬜ Service mesh | Istio |
First of all you have to publish the docker image of the app into your local repository with
./deployLocalDockerImage.sh
Then you can choose to either run the app with docker-compose
or minikube
.
Run the deploy script to run the app and the database with docker-compose
.infra/local/docker-compose/deploy.sh
⚠️ You should usehttp
and nothttps
beware that Chrome by default usehttps
Run the deploy script to run the app and the database with minikube. Services are not port forwarded by default.
.infra/local/minikube/deploy.sh
To customize this project please read the guide