deploy to fly
change
commit 119802e3cc41b951e39538f3f766883a20d11078
author Alpha Chen <alpha@kejadlen.dev>
date
parent bb2001b7
diff --git a/.dockerignore b/.dockerignore
new file mode 100644
index 0000000..454f69c
--- /dev/null
+++ b/.dockerignore
@@ -0,0 +1,4 @@
+.direnv
+.envrc
+
+fly.toml
diff --git a/fly.toml b/fly.toml
new file mode 100644
index 0000000..1fcd4a1
--- /dev/null
+++ b/fly.toml
@@ -0,0 +1,17 @@
+app = 'go-ji'
+primary_region = 'sea'
+
+[build]
+
+[http_service]
+  internal_port = 8000
+  force_https = true
+  auto_stop_machines = true
+  auto_start_machines = true
+  min_machines_running = 0
+  processes = ['app']
+
+[[vm]]
+  cpu_kind = 'shared'
+  cpus = 1
+  memory_mb = 256
diff --git a/start.sh b/start.sh
index 29c2a65..feb4ce2 100755
--- a/start.sh
+++ b/start.sh
@@ -3,4 +3,5 @@
 /app/tailscaled --state=/var/lib/tailscale/tailscaled.state --socket=/var/run/tailscale/tailscaled.sock &
 /app/tailscale up --authkey=${TAILSCALE_AUTHKEY} --hostname=go
 
-gunicorn go_ji:app
+/app/tailscale serve --bg --http=80 8000
+gunicorn -b 0.0.0.0 go_ji:app