-
Notifications
You must be signed in to change notification settings - Fork 1.7k
docker
hhyo edited this page Feb 1, 2020
·
12 revisions
可参考:https://github.com/hhyo/Archery/tree/master/src/docker-compose
docker-compose.yml文件内的services可按照本身的运行环境来调整,比如说外部已经装好了mysql、redis、inception,就可以将对应的services删除,但是需要注意修改settings.py文件的相关配置,具体可以参考修改配置
# 启动
docker-compose -f docker-compose.yml up -d
# 表结构初始化
docker exec -ti archery /bin/bash
cd /opt/archery
source /opt/venv4archery/bin/activate
python3 manage.py makemigrations sql
python3 manage.py migrate
# 数据初始化
python3 manage.py loaddata initial_data.json
# 创建管理用户
python3 manage.py createsuperuser
# 重启
docker restart archery
# 日志查看和问题排查
docker logs archery -f --tail=50