EnglishPal/build.sh

19 lines
556 B
Bash
Raw Permalink Normal View History

#!/bin/sh
2022-02-05 22:59:45 +08:00
cd /home/lanhui/englishpal2/EnglishPal
# Stop service
sudo docker stop EnglishPal
sudo docker rm EnglishPal
# Rebuild container. Run this after modifying the source code.
sudo docker build -t englishpal .
# Run the application
2022-02-05 22:59:45 +08:00
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