deploy code 2
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user