MiroFish/docker-compose.yml
666ghj e432e223df Update project configuration and structure with Docker support and environment variable adjustments
- Updated .env.example to reflect new LLM configuration with Aliyun's API.
- Enhanced .gitignore to include additional files and directories for better exclusion of sensitive and build artifacts.
- Added docker-compose.yml for streamlined deployment of backend and frontend services.
- Introduced Dockerfiles for both backend and frontend to facilitate containerized builds.
- Created README.md to provide comprehensive project documentation and setup instructions.
- Established nginx configuration for frontend to support API proxying and static file serving.
2025-12-17 18:17:40 +08:00

44 lines
901 B
YAML

version: '3.8'
services:
# 后端服务
backend:
build:
context: ./backend
dockerfile: Dockerfile
container_name: mirofish-backend
ports:
- "5001:5001"
environment:
- FLASK_HOST=0.0.0.0
- FLASK_PORT=5001
- FLASK_DEBUG=false
env_file:
- .env
volumes:
# 持久化上传文件和模拟数据
- ./data/uploads:/app/uploads
restart: unless-stopped
healthcheck:
test: ["CMD", "curl", "-f", "http://localhost:5001/health"]
interval: 30s
timeout: 10s
retries: 3
# 前端服务
frontend:
build:
context: ./frontend
dockerfile: Dockerfile
args:
- VITE_API_BASE_URL=http://backend:5001
container_name: mirofish-frontend
ports:
- "3000:80"
depends_on:
- backend
restart: unless-stopped
networks:
default:
name: mirofish-network