mirror of
https://github.com/Leado123/sharesyllabus-server.git
synced 2025-12-13 22:57:28 +00:00
39 lines
999 B
YAML
39 lines
999 B
YAML
version: "3.8"
|
|
|
|
services:
|
|
app:
|
|
build:
|
|
context: .
|
|
dockerfile: Dockerfile
|
|
ports:
|
|
- "4000:4000"
|
|
environment:
|
|
- NODE_ENV=production
|
|
- DATABASE_URL=postgresql://${POSTGRES_USER:-sms}:${POSTGRES_PASSWORD:-smspassword}@db:5432/${POSTGRES_DB:-smsdb}?schema=public
|
|
- SECRET_KEY=${SECRET_KEY:-your-secret-key-change-in-production}
|
|
depends_on:
|
|
db:
|
|
condition: service_healthy
|
|
volumes:
|
|
- syllabi_data:/app/syllabi
|
|
restart: unless-stopped
|
|
|
|
db:
|
|
image: postgres:16-alpine
|
|
environment:
|
|
- POSTGRES_USER=${POSTGRES_USER:-sms}
|
|
- POSTGRES_PASSWORD=${POSTGRES_PASSWORD:-smspassword}
|
|
- POSTGRES_DB=${POSTGRES_DB:-smsdb}
|
|
volumes:
|
|
- postgres_data:/var/lib/postgresql/data
|
|
healthcheck:
|
|
test: ["CMD-SHELL", "pg_isready -U ${POSTGRES_USER:-sms} -d ${POSTGRES_DB:-smsdb}"]
|
|
interval: 5s
|
|
timeout: 5s
|
|
retries: 5
|
|
restart: unless-stopped
|
|
|
|
volumes:
|
|
postgres_data:
|
|
syllabi_data:
|