80 lines
2.2 KiB
YAML
80 lines
2.2 KiB
YAML
services:
|
|
postgres:
|
|
image: docker.m.daocloud.io/library/postgres:16-bookworm
|
|
restart: unless-stopped
|
|
environment:
|
|
TZ: ${TZ:-Asia/Shanghai}
|
|
POSTGRES_DB: ${POSTGRES_DB:-order_site}
|
|
POSTGRES_USER: ${POSTGRES_USER:-postgres}
|
|
POSTGRES_PASSWORD: ${POSTGRES_PASSWORD:-postgres}
|
|
healthcheck:
|
|
test:
|
|
[
|
|
"CMD-SHELL",
|
|
"pg_isready -U ${POSTGRES_USER:-postgres} -d ${POSTGRES_DB:-order_site}",
|
|
]
|
|
interval: 5s
|
|
timeout: 5s
|
|
retries: 20
|
|
volumes:
|
|
- postgres_kuaishou_data:/var/lib/postgresql/data
|
|
|
|
backend:
|
|
build:
|
|
context: .
|
|
dockerfile: deploy/docker/backend-kuaishou.Dockerfile
|
|
restart: unless-stopped
|
|
env_file:
|
|
- .env
|
|
depends_on:
|
|
postgres:
|
|
condition: service_healthy
|
|
healthcheck:
|
|
test:
|
|
["CMD-SHELL", "curl -fsS http://127.0.0.1:3000/health/ready || exit 1"]
|
|
interval: 5s
|
|
timeout: 5s
|
|
retries: 20
|
|
start_period: 20s
|
|
environment:
|
|
TZ: ${TZ:-Asia/Shanghai}
|
|
PORT: ${BACKEND_PORT:-3000}
|
|
DATABASE_URL: ${DATABASE_URL:-postgres://postgres:postgres@postgres:5432/order_site}
|
|
DATABASE_SSL: ${DATABASE_SSL:-false}
|
|
DATABASE_MAX_CONNECTIONS: ${DATABASE_MAX_CONNECTIONS:-20}
|
|
DATA_ROOT: /app/data
|
|
CLAIM_BASE_URL: ${CLAIM_BASE_URL:-http://localhost/#/claim}
|
|
ADMIN_SESSION_SECRET: ${ADMIN_SESSION_SECRET}
|
|
ADMIN_DEFAULT_USERS_JSON: ${ADMIN_DEFAULT_USERS_JSON}
|
|
AGISO_APP_SECRET: ${AGISO_APP_SECRET:-}
|
|
AGISO_MESSAGING_ENABLED: ${AGISO_MESSAGING_ENABLED:-false}
|
|
volumes:
|
|
- ./deploy/data/backend-kuaishou:/app/data
|
|
|
|
web:
|
|
build:
|
|
context: .
|
|
dockerfile: deploy/docker/frontend.Dockerfile
|
|
args:
|
|
APP_DOMAIN: ${APP_DOMAIN:-localhost}
|
|
VITE_APP_MODE: kuaishou
|
|
restart: unless-stopped
|
|
depends_on:
|
|
backend:
|
|
condition: service_healthy
|
|
ports:
|
|
- "80:80"
|
|
- "443:443"
|
|
environment:
|
|
TZ: ${TZ:-Asia/Shanghai}
|
|
APP_DOMAIN: ${APP_DOMAIN:-localhost}
|
|
CADDY_SITE_ADDR: ${CADDY_SITE_ADDR:-http://localhost}
|
|
volumes:
|
|
- caddy_kuaishou_data:/data
|
|
- caddy_kuaishou_config:/config
|
|
|
|
volumes:
|
|
postgres_kuaishou_data:
|
|
caddy_kuaishou_data:
|
|
caddy_kuaishou_config:
|