12. Deployment
This chapter describes how to deploy a MontiGem application using Docker.
12.1 Requirements
Hardware (Recommended): * 2 CPUs * 4 GB RAM * 5 GB HDD
Software: * Linux OS with Docker Compose. * Open Ports 80 and 443 (TCP). * A Domain (for SSL via Let's Encrypt).
12.2 Building Docker Images
Backend
We recommend using Jib to build the backend image without a local Docker daemon.
cd backend
gradle jib \
-Djib.to.image=<imageNameOfBackend> \
-Djib.to.auth.username=<RegistryUser> \
-Djib.to.auth.password=<RegistryPassword>
Frontend
The frontend uses Caddy as a web server and reverse proxy.
- Ensure
DockerfileandCaddyfileare present (generated bysetupFrontend). - Build the image:
cd frontend gradle assemble docker build . -t <imageNameOfFrontend> - Push the image to your registry.
12.3 Deploying on Server
- Copy the
docker-compose.yml(fromdocs/deploy/) to your server. - Adjust the configuration (image names, ports).
- Login to your registry:
docker login -u user -p <token> registry.example.com - Start the application:
docker compose up --detach
< Previous: Further Reading | Back to Index | Next: Testing >