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 0000000..3b1e196 Binary files /dev/null and b/app/Article.pyc differ diff --git a/app/Login.pyc b/app/Login.pyc new file mode 100644 index 0000000..f0b50cc Binary files /dev/null and b/app/Login.pyc differ diff --git a/app/UseSqlite.pyc b/app/UseSqlite.pyc new file mode 100644 index 0000000..a020c9d Binary files /dev/null and b/app/UseSqlite.pyc differ diff --git a/app/WordFreq.pyc b/app/WordFreq.pyc new file mode 100644 index 0000000..5a01d59 Binary files /dev/null and b/app/WordFreq.pyc differ 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