Commit e1ca584b authored by xianyang's avatar xianyang

更新docker-conpose文件

parent f46ba8b4
#version: "3"
#services:
# app:
# restart: always
# container_name: financial-system
# build: .
# ports:
# - "8001:8001"
# volumes:
# - /www/wwwroot/financial-system/:/financial-system/
# stdin_open: true
# command: python main.py
version: "3"
services:
app:
financial-system:
restart: always
container_name: financial-system
build: .
build:
context: ./../_base/python-38/
image: python-38
ports:
- "8001:8001"
deploy:
resources:
limits:
cpus: "4.00"
memory: 16G
reservations:
memory: 500M
volumes:
- /www/wwwroot/financial-system/:/financial-system/
- /www/python-38/site-packages/financial-system/:/usr/local/lib/python3.8/site-packages
- /www/wwwroot/financial-system/:/var/www/
logging:
driver: json-file
options:
max-size: "20m"
max-file: "10"
stdin_open: true
command: python main.py
\ No newline at end of file
command: >
sh -c "python -m ensurepip &&
python -m pip install --upgrade pip &&
pip install -r requirements.txt -i https://pypi.tuna.tsinghua.edu.cn/simple &&
python main.py"
\ No newline at end of file
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment