生產(chǎn)環(huán)境

2018-01-09 15:20 更新
  • install nginx mysql python3.6 Inception(install目錄下有已經(jīng)編譯好的Inception可以直接運(yùn)行)
  • git clone https://github.com/cookieY/Yearning.git
  • 編輯 Yearning/src/deploy.conf

[mysql]
db = 所創(chuàng)建的庫(kù)名
address = 數(shù)據(jù)庫(kù)地址
port = 端口
password = 數(shù)據(jù)庫(kù)密碼
username = 數(shù)據(jù)庫(kù)用戶
[host]
ipaddress = 服務(wù)器外網(wǎng)ip地址
[Inception]
ip = Inception地址
port = Inception端口
user = Inception用戶名
password  = Inception密碼
backupdb = 備份數(shù)據(jù)庫(kù)地址
backupport = 備份數(shù)據(jù)庫(kù)端口
backupuser = 備份數(shù)據(jù)庫(kù)用戶名
backuppassword = 備份數(shù)據(jù)庫(kù)密碼
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    
以上內(nèi)容是否對(duì)您有幫助:
在線筆記
App下載
App下載

掃描二維碼

下載編程獅App

公眾號(hào)
微信公眾號(hào)

編程獅公眾號(hào)