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

  1. Open Projects and press Deploy demo on the demo-decoupled card.
  2. Jambotron creates the project, uploads the sources, chooses docker-compose.yml and starts the deployment. Follow the logs on the Deployments page.
  3. Two images are built — backend (Gradle) and frontend (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 frontend serves the UI and proxies /api to http://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

  1. Open the project → Domains → Add domain.
  2. Choose the frontend service, enter a subdomain and container port 80.
  3. 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.