~kameliya/tori

ref: 4051e3ace2363ec2a288a3d6fe2c98c0eca4aaa2 tori/backend/Makefile -rw-r--r-- 558 bytes
4051e3acAsherah Connor less downtime during deploy 1 year, 2 months ago
                                                                                
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
DEPLOY_HOST = miriam
DEPLOY_BINARY = /var/www/tori/torid
DEPLOY_MIGRATIONS = /var/www/tori/migrations

.PHONY: torid torid-openbsd deploy
torid:
	env GOOS=linux GOARCH=amd64 go build -o torid

torid-openbsd:
	env GOOS=openbsd GOARCH=amd64 go build -o torid-openbsd

deploy: torid-openbsd
	rsync -avzP torid-openbsd ${DEPLOY_HOST}:${DEPLOY_BINARY}-new
	rsync -avzP --delete migrations/ ${DEPLOY_HOST}:${DEPLOY_MIGRATIONS}
	ssh ${DEPLOY_HOST} bash -c "doas rcctl stop torid; mv ${DEPLOY_BINARY}-new ${DEPLOY_BINARY}; doas rcctl start torid"

clean:
	-rm torid