1.安装docker
yum -y update
yum remove docker docker-client docker-client-latest docker-common docker-latest docker-latest-logrotate docker-logrotate docker-selinux docker-engine-selinux docker-engine
yum install -y yum-utils device-mapper-persistent-data lvm2
yum-config-manager --add-repo http://mirrors.aliyun.com/docker-ce/linux/centos/docker-ce.repo
yum -y install docker-ce
systemctl start docker
systemctl enable docker
2.安装 Docker Compose
curl -L https://github.com/docker/compose/releases/download/1.17.1/docker-compose-`uname -s`-`uname -m` > /usr/local/bin/docker-compose
chmod +x /usr/local/bin/docker-compose
3.docker部署archery
yum -y install git
git clone https://github.com/hhyo/Archery.git
cd Archery/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 compilemessages
python3 manage.py createsuperuser
4.登录
在浏览器输入http://服务器IP:9123
使用第三步中用python3 manage.py createsuperuser命令创建的用户及密码登录即可
注:建议部署时mysql单独在其他服务器安装,不使用docker版本的,将docker-compose.yml中的mysql部分删除再执行docker-compose -f docker-compose.yml up -d并修改配置文件中的mysql地址即可,分开部署在升级时比较简单。