update 上传部署代码
This commit is contained in:
parent
821f81fd60
commit
6bb8642028
|
@ -0,0 +1,14 @@
|
|||
stages:
|
||||
- deploy
|
||||
|
||||
job:
|
||||
stage: deploy
|
||||
script:
|
||||
# - docker stop service_tyc
|
||||
# - docker rm service_tyc
|
||||
- docker build -t service_tyc .
|
||||
- docker run -d -p 51011:51011 --name service_tyc -v /etc/timezone:/etc/timezone:ro -v /etc/localtime:/etc/localtime:ro service_tyc
|
||||
only:
|
||||
- master
|
||||
tags:
|
||||
- service_tyc
|
|
@ -0,0 +1,6 @@
|
|||
FROM python:3.8
|
||||
WORKDIR /usr/src/app/service_tyc
|
||||
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'
|
|
@ -0,0 +1,5 @@
|
|||
flask~=1.1.2
|
||||
flask_cors
|
||||
gunicorn
|
||||
gevent
|
||||
pymongo~=3.11.3
|
|
@ -1,5 +1,5 @@
|
|||
PROJECT_NAME = 'tfse_tyc'
|
||||
PROJECT_PORT = '60006'
|
||||
APP_PORT = '51011'
|
||||
|
||||
# 数据库配置(tyc)
|
||||
DB_HOST = '116.63.130.34'
|
||||
|
|
Loading…
Reference in New Issue