archer 项目地址:
https://github.com/jly8866/archer
安装docker版本
Pull Docker
docker pull hhyo/archer
启动服务
docker run --name archery -v /Users/apbc/Works/code/archer/archer/settings.py:/opt/archer/archer/settings.py -e NGINX_PORT=9123 -p 9123:9123 -dti hhyo/archer
查看 docker id ,使用命令 docker ps
初始化
docker exec -ti f79c5d9ade72 /bin/bash
cd /opt/archer
source /opt/venv4archer/bin/activate
手动创建 archer_github 数据库:
CREATE DATABASE `archer_github`;
创建数据库表:
python3 manage.py makemigrations sql
python3 manage.py migrate
python3 manage.py createsuperuser
liangguojun liangguojun
访问
http://127.0.0.1:9123/
手动安装
安装python3.4
yum install gcc-c++ gcc -y
mkdir /usr/local/python3
tar zxvf Python-3.4.8.tgz
cd Python-3.4.8/
./configure --prefix=/usr/local/python3
make && make install
mv /usr/bin/python /usr/bin/python.bak
ln -s /usr/local/python3/bin/python3 /usr/bin/python
验证,运行 python -V 查看版本
pip install virtualenv
virtualenv venv4archer --python=python3
安装所需相关模块
source venv4archer/bin/activate
pip install -r requirements.txt
pymysql模块兼容inception版本信息
使用src/docker/pymysql目录下的文件替换/path/to/python3/lib/python3.4/site-packages/pymysql/对应文件
mv /Users/apbc/Works/code/archer/src/docker/pymysql /usr/local/python3/lib/python3.4/site-packages/pymysql
安装inception
下载地址:https://github.com/hhyo/inception
安装: inception_build.sh debug
更多inception内容参考: https://inception-document.readthedocs.io/zh_CN/latest/install/
报错:
Can’t connect to HTTPS URL because the SSL module is not available
解决办法:
重新编译安装python
报错:
pkg_resources.DistributionNotFound: The 'pip==18.1' distribution was not found and is required by the application
解决办法:
重新安装pip
手动创建 archer_github 数据库:
CREATE DATABASE `archer_github`;
创建数据库表:
python3 manage.py makemigrations sql
python3 manage.py migrate
python3 manage.py createsuperuser
启动:
python manage.py runserver 127.0.0.1:9123