- Enable database seeding (RUN_SEED: true) to create demo accounts - Fix Express trust proxy configuration for nginx reverse proxy - Add AGENTS.md with comprehensive development guidelines - All demo accounts now working: admin, recruiter, employer, candidate - Resolve rate limiting configuration warnings Fixes: Demo account login failures, Express trust proxy errors
77 lines
2.5 KiB
YAML
77 lines
2.5 KiB
YAML
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:?POSTGRES_PASSWORD is not set}
|
|
expose:
|
|
- "5432"
|
|
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
|
|
|
|
merchantsofhope-supplyanddemandportal-backend:
|
|
build:
|
|
context: ./backend
|
|
dockerfile: Dockerfile
|
|
target: dev
|
|
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:?JWT_SECRET is not set}
|
|
HOST: ${BACKEND_HOST:-0.0.0.0}
|
|
PORT: ${BACKEND_PORT:-3001}
|
|
POSTGRES_HOST: merchantsofhope-supplyanddemandportal-database
|
|
UPLOAD_DIR: /app/uploads/resumes
|
|
RUN_MIGRATIONS: "true"
|
|
RUN_SEED: "true"
|
|
# Backend not exposed - only accessible via frontend proxy
|
|
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:/app
|
|
- backend-resume-uploads:/app/uploads/resumes
|
|
- /app/node_modules
|
|
networks:
|
|
- merchantsofhope-supplyanddemandportal-network
|
|
|
|
merchantsofhope-supplyanddemandportal-frontend:
|
|
build:
|
|
context: ./frontend
|
|
dockerfile: Dockerfile
|
|
target: prod
|
|
container_name: merchantsofhope-supplyanddemandportal-frontend
|
|
environment:
|
|
REACT_APP_API_URL: http://localhost:3001
|
|
ports:
|
|
- "0.0.0.0:12000:80"
|
|
depends_on:
|
|
- merchantsofhope-supplyanddemandportal-backend
|
|
volumes:
|
|
- ./frontend:/app
|
|
- /app/node_modules
|
|
networks:
|
|
- merchantsofhope-supplyanddemandportal-network
|
|
|
|
volumes:
|
|
merchantsofhope-supplyanddemandportal-postgres-data:
|
|
backend-resume-uploads:
|
|
|
|
networks:
|
|
merchantsofhope-supplyanddemandportal-network:
|
|
driver: bridge
|