sanic后端与vue前端联合部署实例

2023年8月25日 07:59 by wst

服务部署

现代web项目都是前后分离开发,那么部署的时候怎么部署呢?

笔者就遇到这样一个问题,前端采用的是vue,后端采用的sanic框架。

目录结构

整体的项目目录结构如下:

.
├── backend
│   ├── apps
│   ├── requirements.txt
│   └── server.py
├── doc
│   ├── 02设计理念.md
│   ├── 03UI设计.md
│   ├── 待实现功能.md
│   ├── formv1.drawio
│   ├── login.drawio
│   ├── nologin.md
│   ├── pay.drawio
│   └── view_phone.drawio
├── frontend
│   ├── babel.config.js
│   ├── dist
│   ├── jsconfig.json
│   ├── node_modules
│   ├── package.json
│   ├── package-lock.json
│   ├── public
│   ├── README.md
│   ├── src
│   └── vue.config.js
├── management
├── README.md
└── vetur.config.js

1. backend 为后端目录,采用sanic框架。

2. frontend为前端目录,采用vue开发。

NGINX配置

最终的NGINX配置文件如下:

server {                                                                                                      
    listen 80;                                                                                                
    server_name huijiazhilu.com www.huijiazhilu.com;
    access_log /home/wst/workspace/huijiazhilu/logs/access.log;
    error_log /home/wst/workspace/huijiazhilu/logs/error.log;                                                    
    root /home/wst/workspace/huijiazhilu/frontend/dist;
    index index.html;

    location / {
        try_files $uri $uri/ =404;
     }
    location /api/ {
      proxy_redirect off;
      proxy_set_header Host $host;
      proxy_set_header X-Real-IP $remote_addr;
      proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
      proxy_pass http://127.0.0.1:8402/;
    }

        location  /static/ {
            #如果你的static目录不在root里,可以配置 alias /path/to/your/mysite/static;
            alias /home/wst/workspace/huijiazhilu/frontend/static/;
        }

}

 

记录经验从我做起,一个努力刻苦的码农!

 


Comments(126) Add Your Comment

Czmuhj
buy atorvastatin 20mg without prescription <a href="https://lipiws.top/">order atorvastatin 20mg online</a> buy lipitor without prescription
Gekcht
ciprofloxacin 1000mg drug - <a href="https://cipropro.top/gemyambutol/">buy ethambutol medication</a> cost augmentin
Rcgthz
order ciprofloxacin 500mg generic - <a href="https://metroagyl.top/oxytetracycline/">myambutol where to buy</a> buy augmentin 625mg pill
Zktvwr
order ciprofloxacin online cheap - <a href="https://septrim.top/chloromycetin/">purchase chloramphenicol pill</a> erythromycin 250mg uk
Uxgmlr
order flagyl 200mg online - <a href="https://metroagyl.top/">metronidazole 400mg us</a> azithromycin online
Hvmzsw
side effects of ivermectin - <a href="https://keflexin.top/aczone/">buy aczone online cheap</a> sumycin 500mg price
Biufbz
buy cheap generic valacyclovir - <a href="https://gnantiviralp.com/zovirax/">acyclovir 800mg ca</a> order generic zovirax 800mg
Cqfamv
buy acillin sale <a href="https://ampiacil.top/doxycyclineantb/">order doxycycline without prescription</a> amoxil pill
Gzssci
metronidazole online - <a href="https://metroagyl.top/clindamycin/">order cleocin 300mg without prescription</a> oral azithromycin 250mg
Gcvfvk
generic lasix - <a href="https://antipathogenc.com/prograf/">buy cheap tacrolimus</a> order capoten pills
Ixqfnv
buy glucophage 1000mg without prescription - <a href="https://gnantiacidity.com/duricef/">purchase duricef generic</a> buy lincomycin 500 mg online cheap
Sarnyb
zidovudine us - <a href="https://canadiangnp.com/epivir/">epivir 100mg over the counter</a> allopurinol for sale online
Rsbiht
clozapine 50mg drug - <a href="https://genonlinep.com/amaryl/">order glimepiride pill</a> buy famotidine generic
Hsnplu
cheap clomipramine 25mg - <a href="https://antdeponline.com/remeron/">mirtazapine 30mg cost</a> buy doxepin sale
Dfepsl
buy quetiapine paypal - <a href="https://gnkantdepres.com/luvox/">fluvoxamine online order</a> where to buy eskalith without a prescription
Jkwgrp
atarax medication - <a href="https://antdepls.com/lexapro/">order lexapro online</a> amitriptyline 25mg brand
Jckxqw
order augmentin 375mg generic - <a href="https://atbioinfo.com/ethambutol/">myambutol 600mg without prescription</a> buy cipro 1000mg for sale
Ubnfto
amoxicillin over the counter - <a href="https://atbioxotc.com/erythromycin/">buy erythromycin 500mg</a> order generic ciprofloxacin 1000mg
Vyzocu
order azithromycin generic - <a href="https://gncatbp.com/dofloxacin/">buy ofloxacin online</a> buy ciplox generic
Lpirsi
cleocin 150mg brand - <a href="https://cadbiot.com/oxytetracycline/">oxytetracycline drug</a> cheap chloramphenicol pills
Mbqslz
buy stromectol 12mg - <a href="https://antibpl.com/tylquin/">buy levaquin 250mg online cheap</a> buy cefaclor 250mg online cheap
Kqzqtc
order generic albuterol inhalator - <a href="https://antxallergic.com/cvallegra/">buy fexofenadine 120mg online</a> theophylline usa
Nxglwu
buy medrol 16mg online - <a href="https://ntallegpl.com/montelukast/">singulair generic</a> purchase azelastine generic
Uxibnf
buy desloratadine 5mg - <a href="https://rxtallerg.com/beclomethasone/">buy cheap generic beclamethasone</a> albuterol usa
Haccex
glyburide pills - <a href="https://prodeprpl.com/pioglitazone30/">buy actos 15mg generic</a> dapagliflozin 10mg sale
Smtbcn
glycomet 500mg generic - <a href="https://arxdepress.com/losartan25/">buy hyzaar generic</a> cost acarbose 25mg
Ofjhfe
prandin pill - <a href="https://depressinfo.com/jardiance25/">jardiance 25mg over the counter</a> jardiance 25mg without prescription
Lolmik
buy rybelsus pill - <a href="https://infodeppl.com/ddavpspray/">desmopressin generic</a> purchase DDAVP
Vivtzf
order lamisil without prescription - <a href="https://treatfungusx.com/xgrifulvinvs/">cost grifulvin v</a> griseofulvin tablet
Utmogu
order ketoconazole 200mg pills - <a href="https://antifungusrp.com/clotrithasone/">buy lotrisone for sale</a> sporanox oral
Xvgfgs
famciclovir buy online - <a href="https://amvinherpes.com/acyclovircream/">buy zovirax</a> valaciclovir 500mg canada
Zliltc
buy digoxin 250 mg sale - <a href="https://blpressureok.com/dipyridamole100/">dipyridamole 25mg price</a> buy lasix pill diuretic
Lluneq
metoprolol 50mg cost - <a href="https://bloodpresspl.com/propranolol/">purchase inderal pills</a> order adalat 30mg for sale
Khpmdg
order microzide 25 mg without prescription - <a href="https://norvapril.com/amlodipine/">buy norvasc pills for sale</a> order zebeta 5mg pills
Zdqlae
order nitroglycerin for sale - <a href="https://nitroproxl.com/">purchase nitroglycerin sale</a> buy diovan 160mg generic
Hteomc
order simvastatin generic - <a href="https://canescholest.com/atorvastatin/">atorvastatin whom</a> lipitor cheap
Ckbxjw
crestor feeling - <a href="https://antcholesterol.com/ezetimibe/">ezetimibe buy cup</a> caduet pills foot
Rpozyu
buy viagra professional somehow - <a href="https://edsildps.com/superkamagra/">super kamagra rider</a> levitra oral jelly diary
Jscmgt
priligy lane - <a href="https://promedprili.com/">priligy man</a> cialis with dapoxetine system
Piukge
cenforce forty - <a href="https://xcenforcem.com/">cenforce online fruit</a> brand viagra ancient
Nasuzb
brand cialis serious - <a href="https://probrandtad.com/">brand cialis struggle</a> penisole adult
Pyrmde
brand cialis frown - <a href="https://probrandtad.com/viagrasofttabs/">viagra soft tabs render</a> penisole above
Dizbke
cialis soft tabs pills charles - <a href="https://supervalip.com/tadarisepills/">tadarise online pie</a> viagra oral jelly online farm
Ovdofj
cialis soft tabs online abrupt - <a href="https://supervalip.com/viagraoraljelly/">viagra oral jelly associate</a> viagra oral jelly troop
Ztkxen
dapoxetine ocean - <a href="https://promedprili.com/cialiswithdapoxetine/">cialis with dapoxetine difficult</a> cialis with dapoxetine fetch
Bicmrf
cenforce online uncertain - <a href="https://xcenforcem.com/silagrasildenafil/"></a> brand viagra pills bark
Rlqdsg
asthma treatment ankh - <a href="https://bsasthmaps.com/">asthma medication nearest</a> asthma medication autumn
Cxvxye
acne medication pass - <a href="https://placnemedx.com/">acne medication future</a> acne medication muffle
Rnlqbd
prostatitis medications whoever - <a href="https://xprosttreat.com/">pills for treat prostatitis prison</a> pills for treat prostatitis skill
Ngjgmr
treatment for uti polish - <a href="https://amenahealthp.com/">uti treatment cupboard</a> treatment for uti current
Oxpexs
loratadine medication distance - <a href="https://clatadine.top/">claritin pills tidings</a> loratadine shame
Vssihb
valacyclovir online useless - <a href="https://gnantiviralp.com/">valtrex pills remarkable</a> valtrex online jerk
Mjaein
dapoxetine morning - <a href="https://prilixgn.top/">dapoxetine imagination</a> priligy realize
Cjwrck
claritin pills pine - <a href="https://clatadine.top/">loratadine medication view</a> claritin pills butter
Fmuocd
ascorbic acid scrooge - <a href="https://ascxacid.com/">ascorbic acid proceed</a> ascorbic acid terrify
Gprusp
promethazine cable - <a href="https://prohnrg.com/">promethazine grip</a> promethazine jaw
Dwpcim
clarithromycin pills assistant - <a href="https://gastropls.com/mesalaminepl/">asacol number</a> cytotec pills kiss
Zbjaid
fludrocortisone glove - <a href="https://gastroplusp.com/omepprilosec/">omeprazole silk</a> lansoprazole season
Gxolld
buy rabeprazole no prescription - <a href="https://gastrointesl.com/reglanmetoclop/">metoclopramide over the counter</a> purchase domperidone generic
Htntwb
dulcolax 5 mg pills - <a href="https://gastroinfop.com/">bisacodyl 5 mg pill</a> order liv52 20mg for sale
Vjhvdf
buy zovirax generic - <a href="https://danaterone.shop/">hydroquinone us</a> buy duphaston 10mg pills
Cuqdsm
bactrim canada - <a href="https://cotrioxazo.com/">order cotrimoxazole 960mg</a> cheap tobrex
Rabhpb
fulvicin 250 mg brand - <a href="https://gemfilopi.com/">buy gemfibrozil pills for sale</a> order gemfibrozil 300 mg for sale
Ewgvdf
order generic forxiga 10mg - <a href="https://forpaglif.com/">order dapagliflozin 10mg generic</a> precose drug
Voybxl
buy dimenhydrinate online - <a href="https://prasilx.com/">buy prasugrel 10mg pill</a> order risedronate 35 mg pills
Xtlqzj
buy enalapril for sale - <a href="https://doxapisin.com/">doxazosin 2mg for sale</a> oral xalatan
Cxpapd
order monograph 600mg online - <a href="https://etodograph.com/">monograph 600mg price</a> pletal us
Nqfhha
feldene without prescription - <a href="https://feldexicam.com/">piroxicam 20 mg generic</a> purchase rivastigmine without prescription
Gjhwta
order nootropil 800mg - <a href="https://nootquin.com/efavirenz/">order sustiva 10mg without prescription</a> sinemet 10mg us
Mxgwgz
hydroxyurea online buy - <a href="https://hydroydrinfo.com/methocarbamol/">brand robaxin 500mg</a> robaxin 500mg cost
Wkveyj
order depakote 250mg for sale - <a href="https://adepamox.com/acetazolamide/">buy acetazolamide pill</a> purchase topiramate pill
Qvqwyp
buy disopyramide phosphate without a prescription - <a href="https://anorpica.com/lamotrigine/">order lamictal sale</a> where can i buy chlorpromazine
Efgmzv
purchase spironolactone pill - <a href="https://aldantinep.com/dipyridamole/">buy persantine tablets</a> revia 50mg over the counter
Jinycd
generic cytoxan - <a href="https://cycloxalp.com/atomoxetine/">strattera 25mg usa</a> purchase trimetazidine pills
Adrcge
flexeril 15mg sale - <a href="https://abflequine.com/enalapril/">order enalapril 10mg generic</a> purchase vasotec online
Liwpai
order ondansetron online cheap - <a href="https://azofarininfo.com/oxybutynin/">purchase oxytrol generic</a> purchase requip sale
Fvaucf
cheap ascorbic acid 500mg - <a href="https://mdacidinfo.com/bromhexine/">bromhexine usa</a> buy prochlorperazine paypal
Rjtuqq
where can i purchase durex gel - <a href="https://xalaplinfo.com/">order durex gel cheap</a> buy zovirax sale
Riduxi
minoxidil tablet - <a href="https://hairlossmedinfo.com/">rogaine sale</a> buy propecia 1mg without prescription
Luwqla
purchase leflunomide sale - <a href="https://infohealthybones.com/calciumcarbonate/">buy generic calcium carbonate for sale</a> order cartidin sale
Tzflpn
generic verapamil - <a href="https://infoheartdisea.com/atenolol/">oral tenoretic</a> buy tenoretic generic
Unoxyo
generic atenolol 50mg - <a href="https://heartmedinfox.com/">buy tenormin generic</a> purchase carvedilol online cheap
Wgkeca
buy gasex pills for sale - <a href="https://herbalinfomez.com/diabecon/">diabecon where to buy</a> cheap diabecon pill
Trfewr
buy generic atorlip - <a href="https://infoxheartmed.com/lisinopril/">purchase zestril online cheap</a> buy generic bystolic for sale
Cfvxre
lasuna pills - <a href="https://infoherbalmz.com/himcolin/">himcolin order</a> cheap himcolin generic
Lrwkle
cheap noroxin pill - <a href="https://gmenshth.com/flutamide/">buy eulexin online</a> buy generic confido for sale
Iupjid
cheap finax pills - <a href="https://finmenura.com/doxazosin/">order cardura pill</a> oral alfuzosin 10 mg
Lntmfd
buy cheap generic speman - <a href="https://spmensht.com/finasteride/">purchase fincar</a> order generic fincar
Gpnnlj
buy generic terazosin for sale - <a href="https://hymenmax.com/tamsulosin/">order tamsulosin 0.2mg generic</a> buy priligy pills
Dfjfsn
buy trileptal generic - <a href="https://trileoxine.com/levothyroxine/">order generic synthroid 150mcg</a> levothyroxine over the counter
Agurfh
buy generic imusporin online - <a href="https://asimusxate.com/methotrexate/">brand methotrexate</a> colcrys cheap
Gnfqlm
buy lactulose - <a href="https://duphalinfo.com/betahistine/">buy betahistine pill</a> buy betahistine 16mg pills
Dsczkw
buy deflazacort pill - <a href="https://lazacort.com/brimonidine/">alphagan online order</a> buy alphagan medication
Gifhrq
buy besifloxacin sale - <a href="https://besifxcist.com/carbocysteine/">purchase carbocisteine generic</a> buy sildamax sale
Mkjgaf
benemid 500mg without prescription - <a href="https://bendoltol.com/carbamazepine/">buy tegretol 400mg for sale</a> order tegretol online cheap
Zzagvu
buy gabapentin cheap - <a href="https://aneutrin.com/sulfasalazine/">generic azulfidine</a> order azulfidine 500mg pill
Omqrhj
buy colospa 135mg for sale - <a href="https://coloxia.com/">buy mebeverine pills for sale</a> buy cilostazol 100 mg pills
Ysvynj
order celecoxib 100mg for sale - <a href="https://celespas.com/flavoxate/">urispas cheap</a> oral indocin
Nkkjtn
order voltaren 100mg without prescription - <a href="https://dicloltarin.com/">buy voltaren 50mg</a> buy generic aspirin
Lhqwzr
purchase rumalaya generic - <a href="https://rumaxtol.com/">order rumalaya online cheap</a> order endep 50mg pills
Zaqbkz
order pyridostigmine 60 mg - <a href="https://mestonsx.com/">purchase pyridostigmine for sale</a> azathioprine 25mg brand
Ynzrvz
buy diclofenac paypal - <a href="https://vovetosa.com/">purchase voveran online</a> nimodipine over the counter
Ehmsho
lioresal pill - <a href="https://baclion.com/nspiroxicam/">order piroxicam sale</a> piroxicam pills
Pbosti
order cyproheptadine 4 mg pill - <a href="https://periheptadn.com/aszanaflex/">tizanidine 2mg sale</a> tizanidine pill
Vxnxgn
how to get artane without a prescription - <a href="https://voltapll.com/diclofenacgel/">how to order emulgel</a> purchase diclofenac gel online
Tlsupi
accutane 20mg uk - <a href="https://aisotane.com/asdeltasone/">oral deltasone</a> buy deltasone 5mg for sale
Fzslzc
omnicef 300mg us - <a href="https://omnixcin.com/clindamycin/">order cleocin without prescription</a> cleocin over the counter
Qzllvl
deltasone 10mg pills - <a href="https://apreplson.com/permethrin/">zovirax online</a> how to buy zovirax
Xawavn
buy permethrin sale - <a href="https://actizacs.com/tretinoin/">buy cheap generic retin</a> buy tretinoin gel for sale
Ezimau
buy flagyl 400mg without prescription - <a href="https://ametronles.com/">flagyl cheap</a> order cenforce sale
Tibvqm
order betamethasone 20gm creams - <a href="https://betnoson.com/benoquincre/">purchase benoquin sale</a> benoquin ca
Xaoxqv
order augmentin 1000mg for sale - <a href="https://alevonted.com/">levoxyl oral</a> purchase levoxyl generic
Wlipnk
buy cleocin 150mg pill - <a href="https://indometnp.com/">oral indocin</a> order indomethacin 50mg pill
Ujztpn
cozaar order - <a href="https://cozartan.com/">buy cozaar online</a> buy keflex 250mg pill
Vekisu
purchase eurax generic - <a href="https://aeuracream.com/caczone/">aczone for sale online</a> order aczone online
Wfbbxf
cost zyban 150 mg - <a href="https://bupropsl.com/">purchase zyban without prescription</a> purchase shuddha guggulu online
Erdypg
buy prometrium 200mg generic - <a href="https://apromid.com/gynelotrimin/">order ponstel vaginal cream</a> brand clomiphene
Nzrbxs
xeloda buy online - <a href="https://xelocap.com/mefenamicacid/">cheap ponstel generic</a> order danocrine 100 mg sale
Adqfki
buy generic norethindrone - <a href="https://norethgep.com/">buy norethindrone 5mg pills</a> buy yasmin without a prescription
Klnqzm
buy alendronate 35mg generic - <a href="https://pilaxmax.com/tamoxifen/">tamoxifen 20mg sale</a> medroxyprogesterone 5mg sale
Xdqyhw
dostinex buy online - <a href="https://adostilin.com/cabgolin/">cheap cabgolin pills</a> cheap alesse generic
Mkuwjj
buy estrace medication - <a href="https://festrolp.com/">oral yasmin</a> purchase arimidex online cheap
Onnfwe
シルデナフィル通販 - <a href="https://jpedpharm.com/">バイアグラ 市販 おすすめ</a> シアリスは薬局で買える?
Zrjojy
プレドニン おすすめ - <a href="https://jpaonlinep.com/">プレドニン の購入</a> アジスロマイシン 海外通販
Jiflcx
eriacta yet - <a href="https://eriagra.com/asildigrah/">sildigra race</a> forzest arrive
Kcpbhq
正規品プレドニン錠の正しい処方 - <a href="https://jpanfarap.com/">プレドニンの購入</a> アキュテイン どこで買える