Files
MOHPortal/deploy/coolify/docker-compose.yml

60 lines
2.1 KiB
YAML

version: '3.9'
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}
POSTGRES_PASSWORD: ${POSTGRES_PASSWORD:?set POSTGRES_PASSWORD}
volumes:
- merchantsofhope-supplyanddemandportal-postgres-data:/var/lib/postgresql/data
healthcheck:
test: ["CMD", "pg_isready", "-U", "${POSTGRES_USER:-merchantsofhope}"]
interval: 10s
timeout: 5s
retries: 5
merchantsofhope-supplyanddemandportal-backend:
image: ${BACKEND_IMAGE:?set BACKEND_IMAGE}
container_name: merchantsofhope-supplyanddemandportal-backend
depends_on:
merchantsofhope-supplyanddemandportal-database:
condition: service_healthy
environment:
NODE_ENV: production
PORT: 3001
DATABASE_URL: postgresql://${POSTGRES_USER:-merchantsofhope}:${POSTGRES_PASSWORD}@merchantsofhope-supplyanddemandportal-database:5432/${POSTGRES_DB:-merchantsofhope_supplyanddemandportal}
JWT_SECRET: ${JWT_SECRET:?set JWT_SECRET}
UPLOAD_DIR: /app/uploads/resumes
RUN_MIGRATIONS: "true"
RUN_SEED: "false"
DB_WAIT_TIMEOUT_MS: 120000
ports:
- "0.0.0.0:3001:3001"
volumes:
- merchantsofhope-supplyanddemandportal-uploads:/app/uploads/resumes
healthcheck:
test: ["CMD-SHELL", "wget -qO- http://localhost:3001/api/health || exit 1"]
interval: 30s
timeout: 5s
retries: 5
merchantsofhope-supplyanddemandportal-frontend:
image: ${FRONTEND_IMAGE:?set FRONTEND_IMAGE}
container_name: merchantsofhope-supplyanddemandportal-frontend
depends_on:
merchantsofhope-supplyanddemandportal-backend:
condition: service_healthy
environment:
HOST: 0.0.0.0
PORT: 12000
REACT_APP_API_URL: ${REACT_APP_API_URL:-http://merchantsofhope-supplyanddemandportal-backend:3001}
ports:
- "0.0.0.0:12000:12000"
volumes:
merchantsofhope-supplyanddemandportal-postgres-data:
merchantsofhope-supplyanddemandportal-uploads: