1
This commit is contained in:
@ -1,30 +1,22 @@
|
|||||||
version: '3.8'
|
version: '3.8'
|
||||||
services:
|
services:
|
||||||
backend:
|
backend:
|
||||||
image: python:3.11-bookworm # 使用Debian-based的官方镜像
|
build: ./back
|
||||||
container_name: backend
|
container_name: backend
|
||||||
ports:
|
ports:
|
||||||
- "7792:5000"
|
- "7792:5000"
|
||||||
volumes:
|
volumes:
|
||||||
- ./back:/app
|
- ./back:/app
|
||||||
working_dir: /app
|
|
||||||
environment:
|
environment:
|
||||||
- FLASK_ENV=development
|
- FLASK_ENV=development
|
||||||
command: >
|
|
||||||
sh -c "python -m pip install --upgrade pip &&
|
|
||||||
pip install -r requirements.txt &&
|
|
||||||
python app.py"
|
|
||||||
depends_on:
|
depends_on:
|
||||||
- frontend
|
- frontend
|
||||||
|
|
||||||
frontend:
|
frontend:
|
||||||
image: node:21
|
build: ./platform
|
||||||
container_name: frontend
|
container_name: frontend
|
||||||
ports:
|
ports:
|
||||||
- "7793:5173"
|
- "7793:5173"
|
||||||
volumes:
|
volumes:
|
||||||
- ./platform:/app
|
- ./platform:/app
|
||||||
working_dir: /app
|
|
||||||
environment:
|
environment:
|
||||||
- NODE_ENV=development
|
- NODE_ENV=development
|
||||||
command: sh -c "npm install && npm run dev"
|
|
||||||
Reference in New Issue
Block a user