forked from mrlan/EnglishPal
(1) Downgrade Flask version from 2.3.2 to 2.0.3 as installing the higher version reports errors. This is probably due to my outdated python version (3.6). (2) Persist SQLite database data in a docker volume. Created a docker volume called englishpal-db using command 'docker volume create englishpal-db' and associate this volume with the docker image file directory /app. So, now what happens in /app will be mirrored to englishpal-db. Where is englishpal-db located? Use command 'docker volume inspect englishpal-db' to find out.
parent
20051e1a93
commit
6ea0b970a2
Binary file not shown.
2
build.sh
2
build.sh
|
@ -15,7 +15,7 @@ sudo docker rm EnglishPal
|
|||
sudo docker build -t englishpal .
|
||||
|
||||
# Run the application
|
||||
sudo docker run --restart=always -d --name EnglishPal -p 90:80 -v ${DEPLOYMENT_DIR}/app/static/frequency:/app/static/frequency -v ${DEPLOYMENT_DIR}/app/static/:/app/static/ -t englishpal # for permanently saving data
|
||||
sudo docker run --restart=always -d --name EnglishPal -p 90:80 -v ${DEPLOYMENT_DIR}/app/static/frequency:/app/static/frequency -v ${DEPLOYMENT_DIR}/app/static:/app/static --mount type=volume,src=englishpal-db,target=/app -t englishpal # for permanently saving data
|
||||
|
||||
# Save space. Run it after sudo docker run
|
||||
sudo docker system prune -a -f
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
Flask==2.3.2
|
||||
Flask==2.0.3
|
||||
selenium==3.141.0
|
||||
PyYAML~=6.0
|
||||
pony==0.7.16
|
||||
|
|
Loading…
Reference in New Issue