This commit is contained in:
cjw
2026-02-13 00:29:12 +08:00
parent 09e586734b
commit aa1c91b818
7 changed files with 43 additions and 20 deletions
+4 -3
View File
@@ -45,15 +45,16 @@ services:
build: .
container_name: moldinsight_app
ports:
- "10001:8000" # 宿主机端口:容器端口
- "${HOST_PORT:-10001}:${CONTAINER_PORT:-8000}" # 宿主机端口:容器端口
volumes:
- ./uploads:/app/uploads
- ./html_output:/app/html_output
- ./logs:/app/logs
- ./.env:/app/.env:ro
environment:
# 应用内部使用8000端口(容器内)
- PORT=8000
# 应用端口配置(从settings.py读取)
- HOST=${HOST:-0.0.0.0}
- PORT=${CONTAINER_PORT:-8000}
# 数据库配置
- DB_HOST=postgres
- DB_PORT=5432