version: '3.8' services: merchantsofhope-supplyanddemandportal-database: image: postgres:15-alpine container_name: merchantsofhope-supplyanddemandportal-database environment: POSTGRES_DB: ${POSTGRES_DB:-merchantsofhope_supplyanddemandportal} POSTGRES_USER: ${POSTGRES_USER:-merchantsofhope_user} POSTGRES_PASSWORD: ${POSTGRES_PASSWORD} volumes: - merchantsofhope-supplyanddemandportal-postgres-data:/var/lib/postgresql/data healthcheck: test: ["CMD-SHELL", "pg_isready -U ${POSTGRES_USER:-merchantsofhope_user}"] interval: 10s timeout: 5s retries: 5 networks: - merchantsofhope-supplyanddemandportal-network restart: unless-stopped merchantsofhope-supplyanddemandportal-backend: build: context: ./backend dockerfile: Dockerfile target: prod container_name: merchantsofhope-supplyanddemandportal-backend environment: DATABASE_URL: postgresql://${POSTGRES_USER:-merchantsofhope_user}:${POSTGRES_PASSWORD}@merchantsofhope-supplyanddemandportal-database:5432/${POSTGRES_DB:-merchantsofhope_supplyanddemandportal} JWT_SECRET: ${JWT_SECRET} NODE_ENV: production HOST: 0.0.0.0 PORT: 3001 POSTGRES_HOST: merchantsofhope-supplyanddemandportal-database UPLOAD_DIR: /app/uploads/resumes RUN_MIGRATIONS: "true" RUN_SEED: "false" ports: - "3001:3001" depends_on: merchantsofhope-supplyanddemandportal-database: condition: service_healthy healthcheck: test: ["CMD-SHELL", "wget -qO- http://localhost:3001/api/health || exit 1"] interval: 30s timeout: 5s retries: 5 volumes: - backend-resume-uploads:/app/uploads/resumes networks: - merchantsofhope-supplyanddemandportal-network restart: unless-stopped merchantsofhope-supplyanddemandportal-frontend: build: context: ./frontend dockerfile: Dockerfile target: prod container_name: merchantsofhope-supplyanddemandportal-frontend environment: REACT_APP_API_URL: ${REACT_APP_API_URL:-http://localhost:3001} ports: - "80:80" depends_on: - merchantsofhope-supplyanddemandportal-backend networks: - merchantsofhope-supplyanddemandportal-network restart: unless-stopped volumes: merchantsofhope-supplyanddemandportal-postgres-data: backend-resume-uploads: networks: merchantsofhope-supplyanddemandportal-network: driver: bridge