1
0
Fork 0

build.sh: deploy the new code

Deployment
Hui Lan 2022-02-05 22:59:45 +08:00
parent e288b19678
commit 18684ada6b
7 changed files with 5 additions and 3 deletions

View File

@ -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

BIN
app/Article.pyc Normal file

Binary file not shown.

BIN
app/Login.pyc Normal file

Binary file not shown.

BIN
app/UseSqlite.pyc Normal file

Binary file not shown.

BIN
app/WordFreq.pyc Normal file

Binary file not shown.

4
build.sh Normal file → Executable file
View File

@ -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