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 @@
23 # work if this deploys as the same user);23 # work if this deploys as the same user);
24 # * `loginctl enable-linger <user>` on the server unless the deploy user24 # * `loginctl enable-linger <user>` on the server unless the deploy user
25 # already has it (im's does) — user units need a running user manager;25 # 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)
27 # with at least DATABASE_URL — see deploy/hezarfen.service for the keys.27 # with at least DATABASE_URL — see deploy/hezarfen.service for the keys.
28 28
29 name: VPS deploy29 name: VPS deploy
@@ -56,10 +56,10 @@ env:
56 # itself is resolved on the server ($HOME), so switching the deploy user56 # itself is resolved on the server ($HOME), so switching the deploy user
57 # moves the path with it — a baked-in absolute path once kept pointing at57 # moves the path with it — a baked-in absolute path once kept pointing at
58 # the previous user's home and failed the deploy on permissions.58 # the previous user's home and failed the deploy on permissions.
59- DEPLOY_SUBDIR: hezarfen59+ DEPLOY_SUBDIR: hezarfen_backend
60 # The unit reads its secrets from this file on the server; the deploy60 # The unit reads its secrets from this file on the server; the deploy
61 # never writes it, only checks it exists and holds DATABASE_URL.61 # never writes it, only checks it exists and holds DATABASE_URL.
62- ENV_FILE_NAME: hezarfen.env62+ ENV_FILE_NAME: hezarfen_backend.env
63 # The Postgres the test suite mints its per-test databases on. Credentials63 # The Postgres the test suite mints its per-test databases on. Credentials
64 # and port match the harness default (HEZARFEN_TEST_DATABASE_URL), so the64 # and port match the harness default (HEZARFEN_TEST_DATABASE_URL), so the
65 # tests need no extra environment — only the server, with the raised65 # tests need no extra environment — only the server, with the raised
@@ -260,7 +260,7 @@ jobs:
260 ;;260 ;;
261 esac261 esac
262 deploy_path=$HOME/$1262 deploy_path=$HOME/$1
263- # The deploy path is the service's working tree: hezarfen.env and263+ # The deploy path is the service's working tree: hezarfen_backend.env and
264 # data/ live there and are never touched from here. Only 'current'264 # data/ live there and are never touched from here. Only 'current'
265 # is replaced.265 # is replaced.
266 mkdir -p -- "$deploy_path"266 mkdir -p -- "$deploy_path"
deploy/hezarfen.servicemodified+6 -6
@@ -1,9 +1,9 @@
1 # The systemd user unit the deploy installs to ~/.config/systemd/user/ and1 # The systemd user unit the deploy installs to ~/.config/systemd/user/ and
2-# restarts. The release layout: ~/hezarfen/current/hezarfen_backend with2+# restarts. The release layout: ~/hezarfen_backend/current/hezarfen_backend with
3 # migrations/ beside the binary (the app resolves the schema there when the3 # migrations/ beside the binary (the app resolves the schema there when the
4 # compile-time checkout path is absent — see migrations_path in the source).4 # compile-time checkout path is absent — see migrations_path in the source).
5 #5 #
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)
7 # carries the deployment's own values and overrides the Environment= lines7 # carries the deployment's own values and overrides the Environment= lines
8 # below:8 # below:
9 # DATABASE_URL required — a Postgres with the control database9 # DATABASE_URL required — a Postgres with the control database
@@ -27,13 +27,13 @@ Wants=network-online.target
27 27
28 [Service]28 [Service]
29 Type=simple29 Type=simple
30-ExecStart=%h/hezarfen/current/hezarfen_backend30+ExecStart=%h/hezarfen_backend/current/hezarfen_backend
31-WorkingDirectory=%h/hezarfen/current31+WorkingDirectory=%h/hezarfen_backend/current
32 Environment=HOST=127.0.0.132 Environment=HOST=127.0.0.1
33 Environment=PORT=765633 Environment=PORT=7656
34-Environment=FILES_PATH=%h/hezarfen/data/files34+Environment=FILES_PATH=%h/hezarfen_backend/data/files
35 Environment=RUST_LOG=info,hezarfen_backend=debug35 Environment=RUST_LOG=info,hezarfen_backend=debug
36-EnvironmentFile=%h/hezarfen/hezarfen.env36+EnvironmentFile=%h/hezarfen_backend/hezarfen_backend.env
37 Restart=on-failure37 Restart=on-failure
38 RestartSec=238 RestartSec=2
39 39