docker-compose部署Archery SQL审核工具

下载安装包

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:

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包

打赏作者

学亮编程手记

你的鼓励将是我创作的最大动力

¥1 ¥2 ¥4 ¥6 ¥10 ¥20
扫码支付:¥1
获取中
扫码支付

您的余额不足,请更换扫码支付或充值

打赏作者

实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值