文件
hyb-oa/docker-compose.yml
T

45 行
1.2 KiB
YAML

version: '3.8'
services:
db:
image: postgres:15-alpine
container_name: hyb-oa-db
restart: always
environment:
POSTGRES_USER: ${POSTGRES_USER:-hyboa_user}
POSTGRES_PASSWORD: ${POSTGRES_PASSWORD:?set POSTGRES_PASSWORD in the local environment}
POSTGRES_DB: ${POSTGRES_DB:-hyb_oa}
ports:
- "5432:5432"
volumes:
- postgres_data:/var/lib/postgresql/data
server:
image: node:22-alpine
container_name: hyb-oa-server
restart: unless-stopped
working_dir: /app/server
command: sh -c "npm install && npm run dev"
environment:
DATABASE_URL: "postgresql://${POSTGRES_USER:-hyboa_user}:${POSTGRES_PASSWORD}@db:5432/${POSTGRES_DB:-hyb_oa}?schema=public"
JWT_SECRET: ${JWT_SECRET:?set JWT_SECRET in the local environment}
APP_TIMEZONE: "Asia/Shanghai"
STORAGE_DIR: "generated/storage"
SERVE_CLIENT_DIST: "false"
CLIENT_DIST_DIR: "../client/dist"
SIGNED_URL_TTL_SECONDS: "600"
MAX_UPLOAD_SIZE_BYTES: "10485760"
PORT: "3000"
HOST: "0.0.0.0"
ports:
- "3000:3000"
depends_on:
- db
volumes:
- ./:/app
- server_storage:/app/server/generated/storage
volumes:
postgres_data:
server_storage: