Files
fuel-wizard/compose.yaml
T
2024-11-26 22:14:15 +11:00

66 lines
1.9 KiB
YAML

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:pg16
ports:
#this is exposed only to the docker network, so don't worry about this
- "5432:5432"
environment:
- POSTGRES_PASSWORD=${DB_PASSWORD}
- POSTGRES_USER=${DB_USER}
restart: unless-stopped
container_name: timescaledb-prod
networks:
- app-network
volumes:
- ./volumes/timescaledb-prod:/var/lib/postgresql/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"