From 18684ada6b7b2f95d0c2c0989004666448bbc013 Mon Sep 17 00:00:00 2001 From: Hui Lan Date: Sat, 5 Feb 2022 22:59:45 +0800 Subject: [PATCH] build.sh: deploy the new code --- Dockerfile | 2 ++ app/Article.pyc | Bin 0 -> 5401 bytes app/Login.pyc | Bin 0 -> 3124 bytes app/UseSqlite.pyc | Bin 0 -> 3859 bytes app/WordFreq.pyc | Bin 0 -> 1148 bytes app/Yaml.py | 2 +- build.sh | 4 ++-- 7 files changed, 5 insertions(+), 3 deletions(-) create mode 100644 app/Article.pyc create mode 100644 app/Login.pyc create mode 100644 app/UseSqlite.pyc create mode 100644 app/WordFreq.pyc mode change 100644 => 100755 build.sh diff --git a/Dockerfile b/Dockerfile index 86f0b25..284195a 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,2 +1,4 @@ FROM tiangolo/uwsgi-nginx-flask:python3.6 +COPY requirements.txt /app +RUN pip3 install -r requirements.txt -i https://mirrors.aliyun.com/pypi/simple/ COPY ./app /app diff --git a/app/Article.pyc b/app/Article.pyc new file mode 100644 index 0000000000000000000000000000000000000000..3b1e1968c20449d99300231886fff8c961d1bff6 GIT binary patch literal 5401 zcmb_g+j1Mn5$y$d5kP`BNt7tb_J)ouNU?~7PRdm_2uYEs5)+%Umv*VL6&Gr;I{=p4 z3$!yJg@k-kej<6u2jma(NqKdi@{;6q4?t3uoJy<^+(FMwPfvGGPxo1r|6Z%^Z2dC` zY5Z5h_kBG2i9;0O-=TykCGv?J?w2TWC@qm+qO?qY*^ZVenWA)>{Ao&O$e*#JQzIRv zHzU{I(o1ozD)%=eUOOHW1Z6ud!C>3SIxr?XMq z?Z)9SF{5^(4pm|<^Q?Md+Hag0!qnGh^mVLh90o<>=;)|%1mnA~=#0?p+>M4rH^=S54GOR&sy>4?-V`gqr#=Wwzda~aH-2H}(T_82ieYHr zTy0qAC>K6yF9Jm-T>Bs9X57(+r%bOYb=|UB&#!% zr#jz8=e*81Y@GDID9`bLFhOvv0B9*y3?nC2i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7q}`s*AtwFq0QR0Fhn~ z7y2;PaVN%0(x@Isx82_h6Zr7r>neB4jq-4qs?2O4w{Itk$zP6kB4++{!W(z%YD1e* zqBh1w+TGf6Z*`J9Jh*jx!UdtPak;lL6t-KZl2oGAf9AJB?ShjkO0?MAl0}+xP_r{M zCeHvr!UQ=Bj(E+`TY=Q5Tem-5Z`nw0HtecaRsWP_Ft`&8A&h_!Y~0rR*t$uhFgM0@oi0ILq4K3MM~rJpBBT$JgBB(jw}8t<~Oh1c>rDky%{wfG7DUg~3@_ z*z{UF&-Ym_cQ461f)M)n;UvyjCp}%9W&doHBhKXvizw`%a hmXLNH_GsMxpJX0Rhg+YDzo@r`Zvo2ssjK3 literal 0 HcmV?d00001 diff --git a/app/Login.pyc b/app/Login.pyc new file mode 100644 index 0000000000000000000000000000000000000000..f0b50cc17d530f36d804b6412618c975116498ad GIT binary patch literal 3124 zcmcIm&u<$=6rNo>PVA(lYG_f_3N42SQ$d^rD!`%@RqBdJXqKe~C>5%ZfFM;AxWI*i5WmC)P!Iewal)ND@Vz%q>?kE50#0`J?Y_7BX5RO{Z#MDU zk<9Bezk6lT`Pn$Xh(oPn@bPbnP>2O%+ak0?%@PZiu*jDXp)G0&v5*k8q*zGeE>3;I z@8dBgZsF0C@cY^57ybYn1Hw}DTha9u&IHl8`4$8aJ@*0gXe^H%>r&yRNOwBoGoJ;PN%T5yubzXg`;1-<7 ztI2bDxRLY6TSJ#mJ{+tgvdVI4EmRBZ-18CAkSRU2M7nJXCksu$)^soYGx5=3JSgZ*_G2TN-u zS~E3|dWha>9mU@;j*K;AG1gRin%)!+1)K@%WkOCY+l06Q9MA$W6l4$VShq%RCrn!a z@uXNrbK@>LyN}x-MQwm~M+>0W0r|Q}a!Vj|fU*#6irF+0&nhaw=xd|3QJ)c-9G{$= zn0$KtfX0}{6VtQBf;;C-&(2*jZSl&5nfXG|$?o>Vlg@4*z(kA1xIfw8aeoN`u&p`?|0gIXIGx z9EC8gp$Nd2$ZP{kYUzW>{5bsokjz}BESHlw@}P3M1XY%nV`@r8bgAJFTS?N(a#faB zxRxX>CGWZygx+Eh272u=xE19gPNl37!>FCI669RkH({W(hBhdl8X+Yub_CQm%wcAc zban*QFbT{;^}#2WN)l9ovKv7Kd-@pzG@g-9^%XK@9Q-za`F88h&+YHt-u~<@zJcb4 zQZYAZ8F^>>&X-%ae{65O+v~1}J|xZPX5QJl`^EMrxAwmzlC9pT55MmXiKTAFQNA;S zt=k*zcRtO}#ZBq7H}17>f1JPMg-UYL133LG7BYYJ;)S__p>we?_W(hEp!l<#nx-MD zxksq_)aIP{U|zC_(`35@)r4;Fcm~5Cg+jvcq4J z?)?mw2s$K#(P2k`(b9tl3F%5=wru=%+-Hm6|&HAa+l{-(h!;V*bsh&5#9n z(kNj^{U@HE7@vHmyFdRW{aJ-W8T}tJK)BG>-Lsf;xMgtZq5d&z$Yxx2KA@QXqX;z{ zD#&X#RFImK6yH%sWNAwThe#a{^#wD_lUTAqPU(iD%brWswm<^Q!hRB94j@pY9Xqgs)oTL6NEoQI9O^T zQB|(`K}9NUJ~L_aP>?V<4ymx5jkX>|JBCP|viK|4eH0gFbEWk2N*1p{aHZK$yW0S9 z+a00dVH!@-aGD0%F1k}=>)(Av4d6vD)argSl;>%RiV_V0^AmQ;N+r^n^k6!j9!U@V E32*kqZ~y=R literal 0 HcmV?d00001 diff --git a/app/UseSqlite.pyc b/app/UseSqlite.pyc new file mode 100644 index 0000000000000000000000000000000000000000..a020c9d998a9e64958a1447cd6ab1890337b5b3b GIT binary patch literal 3859 zcmd5;>u(!H5TErcwwusEh|`o(SqcxUs$!`@0ts57CPoB7fK5?Uqv~|MTPK&E@9euZ zNu=Zhg#VcD!2IU?szX3Z{eiSQp4+|Knfc8#|Ho2w_wk>uN5j87|9;6U{gsK&{}qKq zZDw-h-y%OxzY|>&J#Q=W3uF{^m?@5T`K{7ucVWDnCsQE5Os{g3T#(6=U!hAy?IM{X z9hbp{dqQoQS^uTeiQKMf;4@oblA5ri@m7OZM$%81YaYd2(+u6{Xb?0_bQlKd zQO^w@HCq|~gBv#8Ua$F6YBDG`duJlTae^qYjssm%h#_@V(RJRoM8~4*aSo6}X-0;T z9V!j&>;jWCgIahmjw0h((OC4yhFGH^YhISVO+rZ{p-X|$hZ#FUQ^Q(7FA2N$2{5-z>PB#BR)j_cVtITO#BQ{xS+ zu|QTVm)*pqgV3fHpLub&8(8taICCC=Ab#SWNf_fAvnk||x~=XgZ-fVa|I?)!7tL3- zxA?|RoOE653{iNGcdqr;CLh8*8C6oHGIxRI$Ik_+T2np(;1bW092%8FBRMtVd%h+i zwEXx!(;?8yYFT**4XknC!4u;$b)JJ+&TC18H$_KVWv=HYT(Yc5(uPEtoJ!;&yyp=m z_xPS*Ds7yTz#cghxf^_*BFsruCV>NGwsC@b2`60V8l16Pa-_g%4bZkRQ*=_?UOc&aC}|@lT*6n>8xsSE~q&F2Q_eoCQIOYfO0- z1_?}ntl@MiBpQW8qo_>)(a0N(7Ccw;^(x=^kk`0G+*b{VA2u~~O~;XVbewMN4?=#_ z2!YIXqCGN7zYPK~wRjT2E|*UNRk#~>SljzPnLs68j@M zjEDE}heG$1R|*YhMiU+>aD25>|Jz6*PMI{d?2&JI!!bfi)D~Yetc6+DBM1R)1QZh zjMMp&Xy?T@bdi&@Je__>mUCE!wVfAhbiq?X9-Rjjyg=(1oBK^V;L6UMj0wgF=}U4_ zqXQm$u_wJN187fldRUjAYPA8CB*7)?I>vfOZWzj-=LepZF@dK}6Zx`t90yVM4SIr{ z#sk|MSos_ihL$pqa`nHi${ zUmHz&_x|`U*3r+pt>y~cSL-UIXA8%#q!6unurLbxg1QDuX8b>^j ovi)poLcN`sB;1W-NNo5bYa~z5@WhVA+{#C_Vr_M?yr`Dc-(cn8ZU6uP literal 0 HcmV?d00001 diff --git a/app/WordFreq.pyc b/app/WordFreq.pyc new file mode 100644 index 0000000000000000000000000000000000000000..5a01d59dd8b895a91b24d85d05ce4402d35b7cb0 GIT binary patch literal 1148 zcmb_a%Wl&^6g^|-)slilQAH7pY>+I08mTOKh(1DLK|roVMI>FLuyy$ zkJ$s~PEzp!)bSc%iheSm_pep#%zt=Q znu2qu^*VD{AqbU9Nhu-5d9FEw32>?K{i7!hOg-9x4|&6 zX`buCIA?0>C#jSN7>k}rl*CQKa=UfjQs>?L#xuPkBPYgbxk*CEb_q}|wWZe8BXv)C z5-Y!}q%>MPFAjElhDU?dVDF2c+gY-beC`%Od=s$;?+*PfU7nHH9d`tzczlQ8y&m7B YFfZfz(zloXB8Za@RX5n&=&G*z3l%izbpQYW literal 0 HcmV?d00001 diff --git a/app/Yaml.py b/app/Yaml.py index 1bd226e..00974aa 100644 --- a/app/Yaml.py +++ b/app/Yaml.py @@ -24,4 +24,4 @@ with open(partialPath + 'header.html', 'r', encoding='utf-8') as f: yml['header'] = f.read() # header内的文本会被直接添加到所有页面的head标签内 with open(partialPath + 'footer.html', 'r', encoding='utf-8') as f: - yml['footer'] = f.read() # footer内的文本会被直接添加到所有页面的最底部 \ No newline at end of file + yml['footer'] = f.read() # footer内的文本会被直接添加到所有页面的最底部 diff --git a/build.sh b/build.sh old mode 100644 new mode 100755 index 89d6543..3633442 --- a/build.sh +++ b/build.sh @@ -1,6 +1,6 @@ #!/bin/sh -cd /home/lanhui/englishpal +cd /home/lanhui/englishpal2/EnglishPal # Stop service sudo docker stop EnglishPal @@ -10,7 +10,7 @@ sudo docker rm EnglishPal sudo docker build -t englishpal . # Run the application -sudo docker run -d --name EnglishPal -p 90:80 -v /home/lanhui/englishpal/app/static/frequency:/app/static/frequency -v /home/lanhui/englishpal/app/static/:/app/static/ -t englishpal # for permanently saving data +sudo docker run -d --name EnglishPal -p 90:80 -v /home/lanhui/englishpal2/EnglishPal/app/static/frequency:/app/static/frequency -v /home/lanhui/englishpal2/EnglishPal/app/static/:/app/static/ -t englishpal # for permanently saving data # Save space. Run it after sudo docker run sudo docker system prune -a -f