name: qred-card-dashboard-prod x-app: &app build: . image: qred-card-dashboard env_file: .env environment: POSTGRES_HOST: postgres POSTGRES_PORT: 5432 services: postgres: image: postgres:18.6-alpine restart: unless-stopped environment: POSTGRES_USER: ${POSTGRES_USER} POSTGRES_PASSWORD: ${POSTGRES_PASSWORD} POSTGRES_DB: ${POSTGRES_DB} volumes: - pgdata:/var/lib/postgresql healthcheck: test: ['CMD-SHELL', 'pg_isready -U $${POSTGRES_USER} -d $${POSTGRES_DB}'] interval: 2s retries: 30 migrate: <<: *app command: ['node', 'dist/db/migrate.js'] depends_on: postgres: condition: service_healthy seed: <<: *app profiles: [demo] command: ['node', 'dist/db/seed.js'] depends_on: migrate: condition: service_completed_successfully api: <<: *app restart: unless-stopped ports: - 3000:3000 depends_on: migrate: condition: service_completed_successfully volumes: pgdata: