Sync LMS backend source
This commit is contained in:
@@ -0,0 +1,46 @@
|
||||
services:
|
||||
lms-be:
|
||||
build:
|
||||
context: .
|
||||
container_name: lms-be
|
||||
environment:
|
||||
NODE_ENV: production
|
||||
PORT: 4400
|
||||
CORS_ORIGIN: ${CORS_ORIGIN:-*}
|
||||
DATABASE_URL: ${DATABASE_URL:-postgresql://lms:future1234!%40@postgres:5432/lms?schema=public}
|
||||
AUTH_SERVER_URL: ${AUTH_SERVER_URL:-http://host.docker.internal:4100}
|
||||
ports:
|
||||
- "${PORT:-4400}:4400"
|
||||
depends_on:
|
||||
postgres:
|
||||
condition: service_healthy
|
||||
restart: unless-stopped
|
||||
healthcheck:
|
||||
test: ["CMD", "node", "-e", "fetch('http://127.0.0.1:4400/health').then(r=>process.exit(r.ok?0:1)).catch(()=>process.exit(1))"]
|
||||
interval: 30s
|
||||
timeout: 5s
|
||||
retries: 3
|
||||
start_period: 10s
|
||||
|
||||
postgres:
|
||||
image: postgres:17-alpine
|
||||
container_name: lms-postgres
|
||||
command: postgres -c timezone=Asia/Seoul
|
||||
environment:
|
||||
POSTGRES_DB: ${POSTGRES_DB:-lms}
|
||||
POSTGRES_USER: ${POSTGRES_USER:-lms}
|
||||
POSTGRES_PASSWORD: ${POSTGRES_PASSWORD:-future1234!@}
|
||||
ports:
|
||||
- "${POSTGRES_PORT:-5432}:5432"
|
||||
volumes:
|
||||
- postgres_data:/var/lib/postgresql/data
|
||||
restart: unless-stopped
|
||||
healthcheck:
|
||||
test: ["CMD-SHELL", "pg_isready -U ${POSTGRES_USER:-lms} -d ${POSTGRES_DB:-lms}"]
|
||||
interval: 10s
|
||||
timeout: 5s
|
||||
retries: 5
|
||||
start_period: 10s
|
||||
|
||||
volumes:
|
||||
postgres_data:
|
||||
Reference in New Issue
Block a user