Files
nonye/docker-compose.yml
jrhlh 132bb2ce3b 1
2025-07-18 22:26:19 +08:00

30 lines
672 B
YAML

version: '3.8'
services:
backend:
image: python:3.11-bookworm # 使用Debian-based的官方镜像
container_name: backend
ports:
- "7792:5000"
volumes:
- ./back:/app
working_dir: /app
environment:
- FLASK_ENV=development
command: >
sh -c "python -m pip install --upgrade pip &&
pip install -r requirements.txt &&
python app.py"
depends_on:
- frontend
frontend:
image: node:21
container_name: frontend
ports:
- "7793:5173"
volumes:
- ./platform:/app
working_dir: /app
environment:
- NODE_ENV=development
command: sh -c "npm install && npm run dev"