彻底重构-3
This commit is contained in:
+26
-2
@@ -1,4 +1,22 @@
|
||||
services:
|
||||
postgres:
|
||||
image: 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}
|
||||
ports:
|
||||
- "${POSTGRES_PORT:-5432}:5432"
|
||||
healthcheck:
|
||||
test: ["CMD-SHELL", "pg_isready -U ${POSTGRES_USER:-postgres} -d ${POSTGRES_DB:-order_site}"]
|
||||
interval: 5s
|
||||
timeout: 5s
|
||||
retries: 20
|
||||
volumes:
|
||||
- postgres_dev_data:/var/lib/postgresql/data
|
||||
|
||||
backend:
|
||||
build:
|
||||
context: .
|
||||
@@ -11,10 +29,15 @@ services:
|
||||
"npm install --no-fund --no-audit &&
|
||||
python3 -m pip install --no-cache-dir --break-system-packages -e /app/subservices/ocr-worker &&
|
||||
npm run dev"
|
||||
depends_on:
|
||||
postgres:
|
||||
condition: service_healthy
|
||||
environment:
|
||||
TZ: ${TZ:-Asia/Shanghai}
|
||||
PORT: ${BACKEND_PORT:-3000}
|
||||
DATABASE_FILE_PATH: /app/data/order-site.db
|
||||
DATABASE_URL: ${DATABASE_URL:-postgres://postgres:postgres@postgres:5432/order_site}
|
||||
DATABASE_SSL: ${DATABASE_SSL:-false}
|
||||
DATABASE_MAX_CONNECTIONS: ${DATABASE_MAX_CONNECTIONS:-10}
|
||||
OCR_PROJECT_ROOT: /app/subservices/ocr-worker
|
||||
CLAIM_BASE_URL: ${CLAIM_BASE_URL:-http://localhost/#/claim}
|
||||
TENCENT_REDEEM_PROOF_MODE: ${TENCENT_REDEEM_PROOF_MODE:-basic}
|
||||
@@ -24,7 +47,7 @@ services:
|
||||
TENCENT_SESSION_DEBUG: ${TENCENT_SESSION_DEBUG:-false}
|
||||
ADMIN_SESSION_SECRET: ${ADMIN_SESSION_SECRET}
|
||||
ADMIN_DEFAULT_USERS_JSON: ${ADMIN_DEFAULT_USERS_JSON}
|
||||
ORDER_SKU_MAPPINGS_JSON: ${ORDER_SKU_MAPPINGS_JSON}
|
||||
ORDER_FULFILLMENT_BINDINGS_JSON: ${ORDER_FULFILLMENT_BINDINGS_JSON:-[]}
|
||||
AGISO_APP_SECRET: ${AGISO_APP_SECRET:-}
|
||||
AGISO_MESSAGING_ENABLED: ${AGISO_MESSAGING_ENABLED:-false}
|
||||
AGISO_APP_ID: ${AGISO_APP_ID:-}
|
||||
@@ -72,5 +95,6 @@ services:
|
||||
- ./deploy/caddy/Caddyfile.dev:/etc/caddy/Caddyfile:ro
|
||||
|
||||
volumes:
|
||||
postgres_dev_data:
|
||||
backend_node_modules:
|
||||
frontend_node_modules:
|
||||
|
||||
Reference in New Issue
Block a user