1
2
3
4
5
6
7
8
9
10
11
services:

server:
image: python:3
volumes:
- ./app:/app
working_dir: /app
restart: unless-stopped
command: sh -c "pip install -r requirements.txt && python -u 文件名"
environment:
- 变量名='变量值'