搭建版本
运行环境
Linux 虚拟机
docker
下载release 文件
wget https://github.com/hhyo/Archery/archive/refs/tags/v1.8.1.zip
解压zip文件
unzip v1.8.1.zip
docker化启动
解压后,找到docker-compose文件
位置在 /Archery-1.8.1/src/docker-compose
执行命令
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
#创建管理用户- 此过程会要求输入管理员账户和密码 务必保存好,以免丢失和忘却
python3 manage.py createsuperuser
# 退出容器
exit
重启archery
docker restart archery
日志查看和问题排查
docker logs archery -f --tail=10
logs/archery.log
archery 启动后web端口为 9123
域名访问配置
nginx代理配置
nginx-conf/nginx/conf.d
下新建 archery.conf 配置文件 内容如下:
server {
listen 80;
server_name domain.com;
#return 301 https://$host$request_uri;
client_max_body_size 1024M;
location / {
proxy_pass http://lwngxian_archery_web;
proxy_set_header Host $host:$server_port;
}
}
修改 /nginx-conf/nginx/nginx.conf 文件
upstream lwngxian_archery_web {
server hostip:9123;
}
include /etc/nginx/conf.d/*.conf;
运行成功截图
wiki参考
https://archerydms.com/home/
有安装的任何问题,可以私聊博主;博主给您答疑解惑