mirror of
https://github.com/AppFlowy-IO/AppFlowy.git
synced 2024-08-30 18:12:39 +00:00
28 lines
476 B
Bash
28 lines
476 B
Bash
|
if [ -z "$1" ]; then
|
||
|
echo "No port number provided"
|
||
|
exit 1
|
||
|
fi
|
||
|
|
||
|
PORT=$1
|
||
|
|
||
|
echo "Starting deployment on port $PORT"
|
||
|
|
||
|
rm -rf deploy
|
||
|
|
||
|
tar -xzf build-output.tar.gz
|
||
|
|
||
|
rm -rf build-output.tar.gz
|
||
|
|
||
|
mv dist deploy/dist
|
||
|
|
||
|
mv .env deploy/.env
|
||
|
|
||
|
cd deploy
|
||
|
|
||
|
docker system prune -f
|
||
|
|
||
|
docker build -t appflowy-web-app-"$PORT" .
|
||
|
|
||
|
docker rm -f appflowy-web-app-"$PORT" || true
|
||
|
|
||
|
docker run -d --env-file .env -p "$PORT":80 --restart always --name appflowy-web-app-"$PORT" appflowy-web-app-"$PORT"
|