Commit 1b1f4ca5 authored by 张宇's avatar 张宇

Merge branch 'dev' of e.coding.net:gengmei/tob/courier into dev

parents ad968e76 fdf42f80
#### Install
# Courier
更美私信服务
## 本地部署
1. 环境准备
```sh
# ready file: /etc/gm-config/storage/static.dir/helios.dir/static_route_table.json
# ready file: /etc/gm-config
mkdir -p /data/log/courier/app
# hosts文件或者添加courier/settings.py的同级文件settings_local.py覆盖DATABASE和CACHES
vim /etc/hosts
xxxx mysql-server
xxxx redis-server
# 创建 courier/settings_local.py, 准备 DATABASES / CACHES / REDIS 配置信息
# 创建虚拟环境,安装依赖
pip install -r requirements.txt
```
```
#### Run
2. 启动项目
**python manage.py runserver**
##### python manage.py runserver
```sh
GM_RPCD_MODE=deploy GM_RPCD_DEPLOY_CONF_PATH=`pwd`/deploy.conf python manage.py runserver
```
##### gunicorn
**gunicorn**
```sh
GM_RPCD_MODE=deploy GM_RPCD_DEPLOY_CONF_PATH=`pwd`/deploy.conf gunicorn courier.wsgi:application -c deploy/gunicorn.py
GM_RPCD_MODE=deploy GM_RPCD_DEPLOY_CONF_PATH=`pwd`/deploy.conf gunicorn courier.wsgi:application -c deploy/
```
## PaaS 部署
1. 环境准备
- paas-conf 项目配置 `settings_local.py` 文件准备
- configs 项目 配置文件准备
- 静态路由表增加新的服务路由: courier
2. 线上 Sentry 项目开通
3. 容器启动方式见 `Dockerfile`
import multiprocessing
workers = multiprocessing.cpu_count() + 1
bind = '0.0.0.0:8005'
bind = '0.0.0.0:8000'
proc_name = 'courier'
timeout = 3600
preload_app = True
......
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