wd-smebiz/docker-compose.yml

43 lines
919 B
YAML
Raw Normal View History

2023-08-02 10:18:36 +08:00
version: '3.8'
services:
wd-smebiz:
build:
context: .
dockerfile: Dockerfile
volumes:
# 挂载日报代码
- ../wd-smebiz:/home/wd-smebiz
# 挂载静态文件目类
- /home/file/wd-smebiz/static_data:/home/wd-smebiz/static_data
- /home/file/wd-smebiz/static/upload_files:/home/wd-smebiz/static/upload_files
ports:
2023-08-02 10:19:38 +08:00
- "8008:8008"
2023-08-02 10:18:36 +08:00
networks:
- app
command:
bash -c "cd /home/wd-smebiz && python3 main.py"
environment:
- TZ=Asia/Shanghai
2023-08-02 16:46:05 +08:00
depends_on:
- db
db:
image: postgres
restart: always
environment:
POSTGRES_PASSWORD: 12345
POSTGRES_USER: postgres
networks:
- app
volumes:
- postgres_data:/var/lib/postgresql/data
ports:
- "5432:5432" # Map PostgreSQL port 5432 to host port 5432
2023-08-02 10:18:36 +08:00
networks:
app:
2023-08-02 16:46:05 +08:00
external: true
volumes:
postgres_data: