~kameliya/tori

4051e3ace2363ec2a288a3d6fe2c98c0eca4aaa2 — Asherah Connor 9 months ago c2e19c2
less downtime during deploy
1 files changed, 2 insertions(+), 3 deletions(-)

M backend/Makefile
M backend/Makefile => backend/Makefile +2 -3
@@ 10,10 10,9 @@ torid-openbsd:
	env GOOS=openbsd GOARCH=amd64 go build -o torid-openbsd

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

clean:
	-rm torid