CloudLinux.ro
Docker & containers

How to deploy a full app with Docker Compose

Updated 7/20/2026

Here is how to deploy a real app: the web service, the database and a proxy that handles the domain and HTTPS, all with Docker Compose.

1. The structure

services:
  app:
    image: my-app:latest
    environment:
      DB_HOST: db
    depends_on:
      - db
  db:
    image: postgres:16
    environment:
      POSTGRES_PASSWORD: password
    volumes:
      - db_data:/var/lib/postgresql/data

volumes:
  db_data:

2. Start

docker compose up -d

3. Add the domain and HTTPS

Put a reverse proxy in front. You can use Nginx (see Nginx as a reverse proxy) or Traefik, which generates certificates automatically (see Traefik for containers).

4. Updating

To update the app to a new version:

docker compose pull
docker compose up -d

5. Backup

Back up the database volume regularly, see container backups. With hourly billing you can test the deploy on a temporary server and delete it right away.

Put this guide into practice on your own VPS

EU cloud servers, billed hourly, ready in minutes, with one-click installs for dozens of apps.

See pricing

Related tutorials