deploy code 2

This commit is contained in:
NishantRajputRN
2026-05-19 18:12:24 +05:30
parent 44d3f015fe
commit 554c873f5d
4 changed files with 20 additions and 11 deletions
+7 -9
View File
@@ -7,6 +7,8 @@ services:
context: ../backend
dockerfile: Dockerfile
restart: unless-stopped
env_file:
- .env
environment:
PORT: 3001
CORS_ORIGIN: ${CORS_ORIGIN:-http://localhost}
@@ -17,15 +19,11 @@ services:
ports:
- "${API_PORT:-3001}:3001"
healthcheck:
test:
[
"CMD-SHELL",
"node -e \"fetch('http://127.0.0.1:3001/health').then(r=>process.exit(r.ok?0:1)).catch(()=>process.exit(1))\"",
]
interval: 30s
test: ["CMD", "curl", "-fsS", "http://127.0.0.1:3001/health"]
interval: 10s
timeout: 5s
retries: 3
start_period: 10s
retries: 5
start_period: 40s
web:
build:
@@ -41,4 +39,4 @@ services:
- "${WEB_PORT:-80}:80"
depends_on:
api:
condition: service_healthy
condition: service_started