-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdeploy.sh
More file actions
27 lines (17 loc) · 755 Bytes
/
deploy.sh
File metadata and controls
27 lines (17 loc) · 755 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
#!/bin/bash
# PWD=$(pwd)
# export PWD=$PWD
DEPLOY_MODE=$1
git pull
[ ! -d "apps/bookmarks" ] && git clone git@github.com:pondersource/solidBookmarker.git apps/bookmarks
[ ! -d "apps/profile" ] && git clone git@github.com:pondersource/solidProfileEditor.git apps/profile
# find . -type d -depth 2 -exec git --git-dir={}/.git --work-tree=$PWD/{} pull origin main \;
git --git-dir=apps/bookmarks/.git --work-tree=./apps/bookmarks pull origin main
git --git-dir=apps/bookmarks/.git --work-tree=./apps/profile pull origin main
if [ "$DEPLOY_MODE" == "--clean" ]; then
sudo docker stop $(docker ps -a -q)
sudo docker rm $(docker ps -a -q)
fi
docker volume create caddy_data
docker volume create portainer-data
sudo docker compose up -d --build