CI/CD配置
This commit is contained in:
parent
bf45bfdfef
commit
bbaf046257
|
@ -0,0 +1,14 @@
|
||||||
|
stages:
|
||||||
|
- deploy
|
||||||
|
|
||||||
|
job:
|
||||||
|
stage: deploy
|
||||||
|
script:
|
||||||
|
# - docker stop tfse_rating
|
||||||
|
# - docker rm tfse_rating
|
||||||
|
- docker build -t tfse_rating .
|
||||||
|
- docker run -d -p 51012:51012 --name tfse_rating -v /etc/timezone:/etc/timezone:ro -v /etc/localtime:/etc/localtime:ro tfse_rating
|
||||||
|
only:
|
||||||
|
- master
|
||||||
|
tags:
|
||||||
|
- tfse_rating
|
|
@ -0,0 +1,6 @@
|
||||||
|
FROM python:3.8
|
||||||
|
WORKDIR /usr/src/app/tfse_rating
|
||||||
|
COPY requirements.txt ./
|
||||||
|
RUN pip install --no-cache-dir -r requirements.txt -i https://pypi.mirrors.ustc.edu.cn/simple
|
||||||
|
COPY . .
|
||||||
|
CMD ["gunicorn", "app:app", "-c", "./gunicorn.conf.py"]
|
|
@ -0,0 +1,8 @@
|
||||||
|
from setting import APP_PORT
|
||||||
|
|
||||||
|
# 并行工作进程数
|
||||||
|
workers = 10
|
||||||
|
# 监听内网端口
|
||||||
|
bind = '0.0.0.0:{}'.format(APP_PORT)
|
||||||
|
# 工作模式协程
|
||||||
|
worker_class = 'gevent'
|
Loading…
Reference in New Issue