生产环境
2018-01-09 15:20 更新
- install nginx mysql python3.6 Inception(install目录下有已经编译好的Inception可以直接运行)
- git clone https://github.com/cookieY/Yearning.git
- 编辑 Yearning/src/deploy.conf
[mysql]
db = 所创建的库名
address = 数据库地址
port = 端口
password = 数据库密码
username = 数据库用户
[host]
ipaddress = 服务器外网ip地址
[Inception]
ip = Inception地址
port = Inception端口
user = Inception用户名
password = Inception密码
backupdb = 备份数据库地址
backupport = 备份数据库端口
backupuser = 备份数据库用户名
backuppassword = 备份数据库密码
pip3 install -r requirements.txt
python3 manage.py makemigrations && python3 manage.py migrate
python3 manage.py createsuperuser admin
echo "from core.models import Account;Account.objects.create_user(username='admin', password='Yearning_admin', group='admin',is_staff=1)" | python3 manage.py shell
cp -rf $YEARNING_HOME/webpage/dist/* $NGINX_HOME/html/
systemctl start nginx
以上内容是否对您有帮助:
← 首页
更多建议: