forge
Explore
Log in

Don't you dare go Hollow

Deploy home is hezarfen_backend

Browse files at this commit

2d278c6c07d0bdf9487d2492d45e5d6641f5bfa7Ahmet Kaan GümüşParent: 81ac0fb
  • chore
    • deploy home is hezarfen_backend
Show full message
🔧 chore: deploy home is hezarfen_backend

VPS layout is ~/hezarfen_backend/ with hezarfen_backend.env.
The systemd unit name stays hezarfen.
.github/workflows/main.ymlmodified+4 -4
@@ -23,7 +23,7 @@
2323 # work if this deploys as the same user);
2424 # * `loginctl enable-linger <user>` on the server unless the deploy user
2525 # already has it (im's does) — user units need a running user manager;
26-# * a Postgres the backend can reach, and ~/hezarfen/hezarfen.env (0600)
26+# * a Postgres the backend can reach, and ~/hezarfen_backend/hezarfen_backend.env (0600)
2727 # with at least DATABASE_URL — see deploy/hezarfen.service for the keys.
2828
2929 name: VPS deploy
@@ -56,10 +56,10 @@ env:
5656 # itself is resolved on the server ($HOME), so switching the deploy user
5757 # moves the path with it — a baked-in absolute path once kept pointing at
5858 # the previous user's home and failed the deploy on permissions.
59- DEPLOY_SUBDIR: hezarfen
59+ DEPLOY_SUBDIR: hezarfen_backend
6060 # The unit reads its secrets from this file on the server; the deploy
6161 # never writes it, only checks it exists and holds DATABASE_URL.
62- ENV_FILE_NAME: hezarfen.env
62+ ENV_FILE_NAME: hezarfen_backend.env
6363 # The Postgres the test suite mints its per-test databases on. Credentials
6464 # and port match the harness default (HEZARFEN_TEST_DATABASE_URL), so the
6565 # tests need no extra environment — only the server, with the raised
@@ -260,7 +260,7 @@ jobs:
260260 ;;
261261 esac
262262 deploy_path=$HOME/$1
263- # The deploy path is the service's working tree: hezarfen.env and
263+ # The deploy path is the service's working tree: hezarfen_backend.env and
264264 # data/ live there and are never touched from here. Only 'current'
265265 # is replaced.
266266 mkdir -p -- "$deploy_path"
deploy/hezarfen.servicemodified+6 -6
@@ -1,9 +1,9 @@
11 # The systemd user unit the deploy installs to ~/.config/systemd/user/ and
2-# restarts. The release layout: ~/hezarfen/current/hezarfen_backend with
2+# restarts. The release layout: ~/hezarfen_backend/current/hezarfen_backend with
33 # migrations/ beside the binary (the app resolves the schema there when the
44 # compile-time checkout path is absent — see migrations_path in the source).
55 #
6-# ~/hezarfen/hezarfen.env (0600, written once by hand, never by the deploy)
6+# ~/hezarfen_backend/hezarfen_backend.env (0600, written once by hand, never by the deploy)
77 # carries the deployment's own values and overrides the Environment= lines
88 # below:
99 # DATABASE_URL required — a Postgres with the control database
@@ -27,13 +27,13 @@ Wants=network-online.target
2727
2828 [Service]
2929 Type=simple
30-ExecStart=%h/hezarfen/current/hezarfen_backend
31-WorkingDirectory=%h/hezarfen/current
30+ExecStart=%h/hezarfen_backend/current/hezarfen_backend
31+WorkingDirectory=%h/hezarfen_backend/current
3232 Environment=HOST=127.0.0.1
3333 Environment=PORT=7656
34-Environment=FILES_PATH=%h/hezarfen/data/files
34+Environment=FILES_PATH=%h/hezarfen_backend/data/files
3535 Environment=RUST_LOG=info,hezarfen_backend=debug
36-EnvironmentFile=%h/hezarfen/hezarfen.env
36+EnvironmentFile=%h/hezarfen_backend/hezarfen_backend.env
3737 Restart=on-failure
3838 RestartSec=2
3939