summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRobby Zambito <contact@robbyzambito.me>2025-02-01 20:45:30 -0500
committerRobby Zambito <contact@robbyzambito.me>2025-02-16 12:49:17 -0500
commit0facd7006e846b1d0043b430155e1ca8288acbe3 (patch)
tree5038d6a9e11dc0293cdc2588fc28dcc764b24477
parent0151ad157aee975d39587af9083cdc9f549da7b8 (diff)
Deploy on FreeBSD better
Added some changes that should help with deploying on FreeBSD. Before it was holding onto my shell that I ran just deploy from, and killed the proc when I hit ctrl+c.
-rw-r--r--justfile10
1 files changed, 7 insertions, 3 deletions
diff --git a/justfile b/justfile
index 63d27aa..d51fe15 100644
--- a/justfile
+++ b/justfile
@@ -7,8 +7,12 @@ build:
go build -o bin/http-nats-proxy main.go
deploy:
- ssh ${DEPLOY_HOST} "cd ${DEPLOY_DIR} && git pull && just clean build && just run-daemon"
+ ssh -t {{env('DEPLOY_HOST')}} "\
+ cd {{env('DEPLOY_DIR')}} && \
+ git pull -f --rebase && \
+ just clean build run-daemon"
run-daemon:
- pkill http-nats-proxy
- nohup ./bin/http-nats-proxy &
+ pkill http-nats-proxy || true
+ ./bin/http-nats-proxy &>> /var/log/http-nats-proxy.log &
+