forked from mrlan/EnglishPal
Try to figure out how to rebuild the image after updating the source code.
parent
a397c756cf
commit
00ae957b27
|
@ -1,4 +1,5 @@
|
||||||
FROM tiangolo/uwsgi-nginx-flask:python3.8
|
FROM tiangolo/uwsgi-nginx-flask:python3.8-alpine
|
||||||
COPY requirements.txt /app
|
COPY requirements.txt /app
|
||||||
|
RUN pip3 install -U pip
|
||||||
RUN pip3 install -r requirements.txt -i https://mirrors.aliyun.com/pypi/simple/
|
RUN pip3 install -r requirements.txt -i https://mirrors.aliyun.com/pypi/simple/
|
||||||
COPY ./app /app
|
COPY ./app/ /app/
|
||||||
|
|
|
@ -39,7 +39,7 @@
|
||||||
<input type="password" placeholder="密码" class="password" id="password">
|
<input type="password" placeholder="密码" class="password" id="password">
|
||||||
<button type="button" class="btn" onclick="login()">登录</button>
|
<button type="button" class="btn" onclick="login()">登录</button>
|
||||||
<a class="signup" href="/signup">注册</a>
|
<a class="signup" href="/signup">注册</a>
|
||||||
|
<label class="form-text">2023-08-10</label>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
{% endif %}
|
{% endif %}
|
||||||
|
|
6
build.sh
6
build.sh
|
@ -2,17 +2,17 @@
|
||||||
|
|
||||||
DEPLOYMENT_DIR=/home/lanhui/englishpal2/EnglishPal
|
DEPLOYMENT_DIR=/home/lanhui/englishpal2/EnglishPal
|
||||||
cd $DEPLOYMENT_DIR
|
cd $DEPLOYMENT_DIR
|
||||||
|
pwd
|
||||||
# Install dependencies
|
# Install dependencies
|
||||||
|
|
||||||
pip3 install -r requirements.txt
|
#pip3 install -r requirements.txt
|
||||||
|
|
||||||
# Stop service
|
# Stop service
|
||||||
sudo docker stop EnglishPal
|
sudo docker stop EnglishPal
|
||||||
sudo docker rm EnglishPal
|
sudo docker rm EnglishPal
|
||||||
|
|
||||||
# Rebuild container. Run this after modifying the source code.
|
# Rebuild container. Run this after modifying the source code.
|
||||||
sudo docker build -t englishpal --no-cache .
|
sudo docker build -t englishpal .
|
||||||
|
|
||||||
# Run the application
|
# Run the application
|
||||||
sudo docker run --restart=always -d --name EnglishPal -p 90:80 -v ${DEPLOYMENT_DIR}/app/static/frequency:/app/static/frequency --mount type=volume,src=englishpal-db,target=/app -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 --mount type=volume,src=englishpal-db,target=/app -t englishpal # for permanently saving data
|
||||||
|
|
Loading…
Reference in New Issue