version: '3.8' networks: app-network: driver: bridge services: backend-prod: image: backend-prod build: context: ./backend dockerfile: Dockerfile restart: unless-stopped container_name: backend-prod networks: - app-network depends_on: timescaledb-prod: condition: service_healthy ports: #adjust the port for the API here. For example, "6000:5000" would expose port 6000 instead #Changing this will require a change to .env.production in the frontend source as well - "5000:5000" environment: - ASPNETCORE_ENVIRONMENT=Production #adjust the ports here if you change the exposed port on the frontend - ALLOWED_ORIGINS=${ALLOWED_ORIGINS} - TIMESCALE_DB_CONNECTION=Host=timescaledb-prod;Port=5432;Database=postgres;Username=${DB_USER};Password=${DB_PASSWORD} - NSW_FUEL_API_BASE_URL=https://api.onegov.nsw.gov.au - NSW_FUEL_API_KEY=${NSW_FUEL_API_KEY} - NSW_FUEL_API_SECRET=${NSW_FUEL_API_SECRET} - NSW_FUEL_API_AUTH_HEADER=${NSW_FUEL_API_AUTH_HEADER} timescaledb-prod: image: timescale/timescaledb-ha:pg17 ports: - "5432:5432" environment: - POSTGRES_PASSWORD=${DB_PASSWORD} - POSTGRES_USER=${DB_USER} restart: unless-stopped container_name: timescaledb-prod networks: - app-network #if you get a `initdb: error: could not change permissions of directory...` when starting this container for #the first time, you may need to run: `sudo chown -R 1000:1000 volumes/` (or whatever UID:GID you'll be running the container as) volumes: - ./volumes/timescaledb-prod:/home/postgres/pgdata/data healthcheck: test: ["CMD-SHELL", "pg_isready -U ${DB_USER}"] interval: 10s timeout: 5s retries: 5 frontend-prod: image: frontend-prod build: context: ./frontend dockerfile: Dockerfile restart: unless-stopped container_name: frontend-prod networks: - app-network ports: #adjust the port for the frontend here. For example, "8080:3000" would expose port 8080 instead - "3000:3000" environment: - NEXT_PUBLIC_API_BASE_URL=${API_BASE_URL}