diff --git a/docker-compose.yml b/docker-compose.yml new file mode 100644 index 0000000..1f74840 --- /dev/null +++ b/docker-compose.yml @@ -0,0 +1,40 @@ +services: + backend: + build: + context: . + dockerfile: backend/Dockerfile + ports: + - "4011:4011" + environment: + - NODE_ENV=production + - PORT=4011 + - HOST=0.0.0.0 + - JWT_SECRET=${JWT_SECRET:-dev-secret-change-me} + - COSMOS_ENDPOINT=${COSMOS_ENDPOINT:-} + - COSMOS_KEY=${COSMOS_KEY:-} + - COSMOS_DATABASE=${COSMOS_DATABASE:-bytelyst} + - DB_PROVIDER=${DB_PROVIDER:-memory} + - CORS_ORIGIN=${CORS_ORIGIN:-http://localhost:3000} + - PLATFORM_SERVICE_URL=${PLATFORM_SERVICE_URL:-http://localhost:4003} + restart: unless-stopped + healthcheck: + test: ["CMD", "wget", "--spider", "-q", "http://localhost:4011/health"] + interval: 30s + timeout: 5s + retries: 3 + + web: + build: + context: . + dockerfile: web/Dockerfile + ports: + - "3030:3030" + environment: + - NODE_ENV=production + - PORT=3030 + - NEXT_PUBLIC_BACKEND_URL=http://backend:4011 + - NEXT_PUBLIC_PLATFORM_SERVICE_URL=${PLATFORM_SERVICE_URL:-http://localhost:4003} + depends_on: + backend: + condition: service_healthy + restart: unless-stopped