BOSHKHUDZHAEV MAZHNUN
5447d570e0
Fix bug 511
2024-06-14 20:34:18 +08:00
Hui Lan
dca76969eb
解决程序源文件更新了,但是 docker container 中的程序源文件没有更新的问题
...
问题出在 build.sh 中的 --mount type=volume,src=englishpal-db,target=/app 。
运行 docker container 时,会将整个 englishpal-db 对应的文件夹 /var/lib/docker/volumes/englishpal-db/_data
下面的内容拷贝到 docker container 里面的 /app 文件夹下面。
然而,/var/lib/docker/volumes/englishpal-db/_data 下面的源程序文件并不是最新的(比如其 main.py 是 7月17日的)。
将 target=/app 改为 target=/app/db。即可解决问题。
2023-08-10 14:19:37 +08:00
Hui Lan
00ae957b27
Try to figure out how to rebuild the image after updating the source code.
2023-08-10 10:47:57 +08:00
Hui Lan
b8c3d9bda7
No cache while building docker image
2023-07-17 17:46:55 +08:00
Hui Lan
fb80e952b9
Simplify the docker run options
2023-07-17 10:25:07 +08:00
Hui Lan
6ea0b970a2
(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.
2023-07-17 07:45:38 +08:00
Hui Lan
691c5b0d43
build.sh: Install requirements first.
2023-03-21 16:07:10 +08:00
mrlan
ab01b8e19b
Hui-Build ( #55 )
...
Make English Pal docker run automatically each time after Ubuntu reboot.
Hui
Co-authored-by: Hui Lan <lanhui@zjnu.edu.cn>
Reviewed-on: http://121.4.94.30:3000/mrlan/EnglishPal/pulls/55
Co-authored-by: mrlan <mrlan@noreply.121.4.94.30>
Co-committed-by: mrlan <mrlan@noreply.121.4.94.30>
2022-11-01 21:43:01 +08:00
Lan Hui
8647af3158
build.sh: use a variable DEPLOYMENT_DIR to represent the code folder
2022-02-07 13:56:14 +08:00
Hui Lan
18684ada6b
build.sh: deploy the new code
2022-02-05 22:59:45 +08:00
mrlan
6754930707
Merge pull request 'BugFix293' ( #14 ) from BugFix293 into master
...
Reviewed-on: http://121.4.94.30:3000/mrlan/EnglishPal/pulls/14
2021-08-30 08:31:56 +08:00
Hui Lan
baf333678a
main.py and build.sh: shuffle the articles first before select one, relax selection range, keep the database
...
main.py:
- shuffle the articles first before select one
- relax selection range (see the function call within_range)
build.sh:
- keep the database wordfreqapp.db so that the user could login again next time after the program is rebuilt.
Hui
2021-08-30 08:18:47 +08:00
Lan Hui
5e322f067b
requirements.txt includes dependencies of the program. difficulty.py is modified in this fix. Not sure why build.sh is included.
2021-08-20 19:27:44 +08:00
Hui Lan
936a3dd1e6
build.sh: fix error: container name EnglishPal already in use.
2021-07-30 13:20:01 +08:00
Hui Lan
c1062eef31
build.sh: give the container a name EnglishPal.
2021-07-16 19:04:43 +08:00