Deploy demo-decoupled: frontend and backend apart
API, nginx frontend and PostgreSQL as separate services: how they find each other and which one gets the domain.
demo-decoupled is the same application split into three services: a Spring Boot API, an Angular UI served by nginx, and PostgreSQL. It shows how a frontend and a backend live side by side in one project.
Deploy in one click
- Open Projects and press Deploy demo on the
demo-decoupledcard. - Jambotron creates the project, uploads the sources, chooses
docker-compose.ymland starts the deployment. Follow the logs on the Deployments page. - Two images are built —
backend(Gradle) andfrontend(Angular build + nginx) — so the first deployment takes a bit longer.
What is inside
services:
demo-decoupled-postgres: # PostgreSQL 16
image: postgres:16-alpine
backend: # Spring Boot API, port 8080
build: .
depends_on:
demo-decoupled-postgres:
condition: service_healthy
frontend: # Angular + nginx, port 80
build: ./spring-angular-ui
depends_on:
backend:
condition: service_healthy
- nginx in
frontendserves the UI and proxies/apitohttp://backend:8080— services find each other by name; - the browser talks only to
frontend, so the API does not need its own domain;
Open the app
- Open the project → Domains → Add domain.
- Choose the
frontendservice, enter a subdomain and container port80. - Open the HTTPS address — the UI loads and calls the API through nginx.
If you also want the API from outside (for example for a mobile app), add a second domain for backend with port 8080.
Your own frontend and backend
Keep the same pattern: one public service with a domain (nginx or the frontend server) that proxies the API by service name, and memory limits for heavy services. See the guides on quotas and on apps behind a proxy.