services: db: image: postgres:16 container_name: db env_file: - .env ports: - "${PGPORT}:${PGPORT}" volumes: - postgres-db:/var/lib/postgresql/data environment: - POSTGRES_USER=${PGUSER} - POSTGRES_PASSWORD=${PGPASSWORD} - POSTGRES_DB=${PGDATABASE} restart: unless-stopped api: container_name: api build: context: ./api dockerfile: Dockerfile env_file: - .env ports: - "${SERVER_PORT}:${SERVER_PORT}" volumes: - api:/usr/src/app depends_on: - db command: ./bin/api restart: unless-stopped migrator: container_name: migrator build: context: ./migrator dockerfile: Dockerfile env_file: - .env depends_on: - api - db volumes: - goose:/migrations command: goose up restart: unless-stopped spa: container_name: spa build: context: ./spa dockerfile: Dockerfile env_file: - .env ports: - "${HTTP_OUTER_PORT}:${HTTP_INNER_PORT}" - "${HTTPS_OUTER_PORT}:${HTTPS_INNER_PORT}" depends_on: - api - db - migrator restart: unless-stopped certbot: container_name: certbot build: context: ./certbot dockerfile: Dockerfile env_file: - .env restart: unless-stopped volumes: api: postgres-db: goose: