build.sh: deploy the new code
parent
e288b19678
commit
18684ada6b
|
@ -1,2 +1,4 @@
|
||||||
FROM tiangolo/uwsgi-nginx-flask:python3.6
|
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
|
COPY ./app /app
|
||||||
|
|
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
|
@ -24,4 +24,4 @@ with open(partialPath + 'header.html', 'r', encoding='utf-8') as f:
|
||||||
yml['header'] = f.read() # header内的文本会被直接添加到所有页面的head标签内
|
yml['header'] = f.read() # header内的文本会被直接添加到所有页面的head标签内
|
||||||
|
|
||||||
with open(partialPath + 'footer.html', 'r', encoding='utf-8') as f:
|
with open(partialPath + 'footer.html', 'r', encoding='utf-8') as f:
|
||||||
yml['footer'] = f.read() # footer内的文本会被直接添加到所有页面的最底部
|
yml['footer'] = f.read() # footer内的文本会被直接添加到所有页面的最底部
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
#!/bin/sh
|
#!/bin/sh
|
||||||
|
|
||||||
cd /home/lanhui/englishpal
|
cd /home/lanhui/englishpal2/EnglishPal
|
||||||
|
|
||||||
# Stop service
|
# Stop service
|
||||||
sudo docker stop EnglishPal
|
sudo docker stop EnglishPal
|
||||||
|
@ -10,7 +10,7 @@ sudo docker rm EnglishPal
|
||||||
sudo docker build -t englishpal .
|
sudo docker build -t englishpal .
|
||||||
|
|
||||||
# Run the application
|
# 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
|
# Save space. Run it after sudo docker run
|
||||||
sudo docker system prune -a -f
|
sudo docker system prune -a -f
|
||||||
|
|
Loading…
Reference in New Issue