下载安装包
git clone https://gitee.com/rtttte/Archery.git
安装步骤
cd src/docker-compose
# .env文件修改,如果修改了mysql和redis的密码,env里也要更新,或者使用settings.py复写
NGINX_PORT=9123
DEBUG=true
DATABASE_URL=mysql://root:123456@mysql:3306/archery
CACHE_URL=redis://redis:6379/0?PASSWORD=123456
CSRF_TRUSTED_ORIGINS=http://127.0.0.1:9123
# 启动
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 dbshell<sql/fixtures/auth_group.sql
python3 manage.py dbshell<src/init_sql/mysql_slow_query_review.sql
# 创建archery管理员
python3 manage.py createsuperuser
# 日志查看和问题排查
docker logs archery
# mysql错误日志,两个版本都是这样的报错,但平台使用正常,1.8.5镜像版本没有问题,应该不是后端组件连不上数据库
[Note] Access denied for user 'root'@'localhost' (using password: NO)
效果展示
配置
links: