Files
delivery-desk/compose.yaml
yuzhe b42f46c182 chore(config): 更新端口配置从3001到3010
- 将 .env.example 中的 PORT 从 3001 更改为 3010
- 将 CORS_ORIGIN 从 http://localhost:5173 更改为 http://localhost:5180
- 更新 compose.yaml 中的服务端口和健康检查端口为 3010
- 修改 Dockerfile 中暴露的端口为 3010
- 更新文档中的 API 端口引用从 3001 到 3010
- 在 Vite 配置中设置开发服务器端口为 5180
- 更新 Vite 代理目标地址为 http://localhost:3010
2026-07-21 17:13:08 +08:00

41 lines
1.3 KiB
YAML

services:
app:
build: .
restart: unless-stopped
depends_on:
postgres:
condition: service_healthy
environment:
NODE_ENV: production
PORT: 3010
DATABASE_URL: postgresql://delivery_desk:${POSTGRES_PASSWORD}@postgres:5432/delivery_desk
PGSSL: disable
COS_CONFIG_ENCRYPTION_KEY: ${COS_CONFIG_ENCRYPTION_KEY:?COS_CONFIG_ENCRYPTION_KEY is required}
INITIAL_ADMIN_PASSWORD: ${INITIAL_ADMIN_PASSWORD:?INITIAL_ADMIN_PASSWORD is required}
INITIAL_ADMIN_USERNAME: ${INITIAL_ADMIN_USERNAME:-admin}
INITIAL_ADMIN_DISPLAY_NAME: ${INITIAL_ADMIN_DISPLAY_NAME:-平台管理员}
ports:
- "3010:3010"
healthcheck:
test: ["CMD", "node", "-e", "fetch('http://127.0.0.1:3010/api/health').then(r=>{if(!r.ok)process.exit(1)})"]
interval: 10s
timeout: 5s
retries: 10
postgres:
image: postgres:17-alpine
restart: unless-stopped
environment:
POSTGRES_DB: delivery_desk
POSTGRES_USER: delivery_desk
POSTGRES_PASSWORD: ${POSTGRES_PASSWORD:?POSTGRES_PASSWORD is required}
volumes:
- delivery_desk_postgres:/var/lib/postgresql/data
healthcheck:
test: ["CMD-SHELL", "pg_isready -U delivery_desk -d delivery_desk"]
interval: 5s
timeout: 3s
retries: 10
volumes:
delivery_desk_postgres: