-
Notifications
You must be signed in to change notification settings - Fork 4
/
justfile
22 lines (19 loc) · 903 Bytes
/
justfile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
dev:
go run .
build:
go build -o ./chronicle
deploy_lmdb target:
docker build -f "compileDockerfile" --platform linux/amd64 -t chronicle-app .
docker create --name temp-container --platform linux/amd64 chronicle-app
docker cp temp-container:/app/chronicle-linux-amd64 ./chronicle-linux-amd64
docker rm temp-container
rsync --progress chronicle-linux-amd64 {{target}}:chronicle/chronicle-new
ssh {{target}} 'systemctl stop chronicle'
ssh {{target}} 'mv chronicle/chronicle-new chronicle/chronicle'
ssh {{target}} 'systemctl start chronicle'
deploy target:
GOOS=linux GOARCH=amd64 go build -o chronicle-linux-amd64
rsync --progress chronicle-linux-amd64 {{target}}:chronicle/chronicle-new
ssh {{target}} 'systemctl stop chronicle'
ssh {{target}} 'mv chronicle/chronicle-new chronicle/chronicle'
ssh {{target}} 'systemctl start chronicle'