Skip to content

Commit

Permalink
优化文档
Browse files Browse the repository at this point in the history
  • Loading branch information
shenshuo committed May 24, 2019
1 parent c8dc4ed commit db23112
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 8 deletions.
6 changes: 3 additions & 3 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -19,13 +19,13 @@ RUN pip3 install -U git+https://github.com/ss1917/ops_sdk.git

# 4. 复制代码
RUN mkdir -p /var/www/
ADD . /var/www/codo_cron/
ADD . /var/www/codo-cron/

# 5. 安装pip依赖
RUN pip3 install -r /var/www/codo_cron/doc/requirements.txt
RUN pip3 install -r /var/www/codo-cron/doc/requirements.txt

# 6. 初始化生成表结构
# RUN python3 /var/www/codo_cron/db_sync.py
# RUN python3 /var/www/codo-cron/db_sync.py

# 7. 日志
VOLUME /var/log/
Expand Down
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -51,13 +51,13 @@
> <font size="4" color="#dd0000">本服务只能启用一个进程</font>
#### 创建数据库
```sql
create database `do_cron` default character set utf8mb4 collate utf8mb4_unicode_ci;
create database `codo_cron` default character set utf8mb4 collate utf8mb4_unicode_ci;
```

#### 一、docker-compose 安装(推荐)

- 修改settings 配置 主要是MySQL数据库和redis配置
- 执行 docker build . -t do_cron_image
- 执行 docker build . -t codo_cron_image
- docker-compose up -d
- 启动成功默认地址为 ip:9900

Expand Down
2 changes: 1 addition & 1 deletion doc/supervisor_ops.conf
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ programs=cron
command=python3 startup.py --service=cron --port=99%(process_num)02d
process_name=%(program_name)s_%(process_num)02d
numprocs=1
directory=/var/www/codo_cron/
directory=/var/www/codo-cron/
user=root
autostart = true
autorestart=true
Expand Down
4 changes: 2 additions & 2 deletions docker-compose.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
do_cron:
codo-cron:
restart: unless-stopped
image: do_cron_image
image: codo_cron_image
volumes:
- /var/log/supervisor/:/var/log/supervisor/
- /opt/ops_scripts:/opt/ops_scripts
Expand Down

0 comments on commit db23112

Please sign in to comment.