mirror of
https://github.com/CJackHwang/ds2api.git
synced 2026-05-05 00:45:29 +08:00
Add decoupled Docker support with zero-intrusion design
This commit is contained in:
32
docker-compose.dev.yml
Normal file
32
docker-compose.dev.yml
Normal file
@@ -0,0 +1,32 @@
|
||||
# DS2API 开发环境配置
|
||||
# 特性:
|
||||
# - 源代码挂载(热重载)
|
||||
# - 调试日志级别
|
||||
# - 自动重启
|
||||
#
|
||||
# 使用说明:
|
||||
# docker-compose -f docker-compose.dev.yml up
|
||||
|
||||
services:
|
||||
ds2api:
|
||||
build: .
|
||||
image: ds2api:dev
|
||||
container_name: ds2api-dev
|
||||
ports:
|
||||
- "${PORT:-5001}:5001"
|
||||
env_file:
|
||||
- .env
|
||||
environment:
|
||||
- HOST=0.0.0.0
|
||||
- LOG_LEVEL=DEBUG
|
||||
volumes:
|
||||
# 源代码挂载(开发时实时生效)
|
||||
- ./app.py:/app/app.py:ro
|
||||
- ./core:/app/core:ro
|
||||
- ./routes:/app/routes:ro
|
||||
- ./static:/app/static:ro
|
||||
# 配置文件挂载(便于本地修改)
|
||||
- ./config.json:/app/config.json:ro
|
||||
restart: "no"
|
||||
stdin_open: true
|
||||
tty: true
|
||||
Reference in New Issue
Block a user