stock-monitor/docker/docker-compose.yml
2025-11-17 13:21:21 +08:00

52 lines
1.1 KiB
YAML
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

version: '3.8'
services:
stock-monitor:
build:
dockerfile: docker/Dockerfile
container_name: stock-monitor
ports:
- "8000:8000"
volumes:
- /vol1/1000/Docker/stock_montior/stock-montior:/app
environment:
- PYTHONUNBUFFERED=1
restart: unless-stopped
networks:
- stock-network
# # 可选添加Redis缓存服务
# redis:
# image: redis:7-alpine
# container_name: stock-redis
# ports:
# - "6379:6379"
# volumes:
# - redis_data:/data
# restart: unless-stopped
# networks:
# - stock-network
#
# # 可选添加PostgreSQL数据库
# postgres:
# image: postgres:15-alpine
# container_name: stock-postgres
# ports:
# - "5432:5432"
# environment:
# POSTGRES_DB: stock_monitor
# POSTGRES_USER: stock_user
# POSTGRES_PASSWORD: stock_password
# volumes:
# - postgres_data:/var/lib/postgresql/data
# restart: unless-stopped
# networks:
# - stock-network
networks:
stock-network:
driver: bridge
#volumes:
# redis_data:
# postgres_data: