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 10:05:15 -0500
commit0151ad157aee975d39587af9083cdc9f549da7b8 (patch)
tree5b8020c0a30a4429188ccd64b6058d81068e7ecb
parent4f940db063eb50aad0a1ca259561c29e4b83f366 (diff)
Add justfile
Make it easier to deploy
-rw-r--r--.gitignore2
-rw-r--r--justfile14
2 files changed, 16 insertions, 0 deletions
diff --git a/.gitignore b/.gitignore
new file mode 100644
index 0000000..9f96217
--- /dev/null
+++ b/.gitignore
@@ -0,0 +1,2 @@
+bin/
+.env
diff --git a/justfile b/justfile
new file mode 100644
index 0000000..63d27aa
--- /dev/null
+++ b/justfile
@@ -0,0 +1,14 @@
+set dotenv-load := true
+
+clean:
+ rm -rf bin/
+
+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"
+
+run-daemon:
+ pkill http-nats-proxy
+ nohup ./bin/http-nats-proxy &