diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 0cdc32b..d622654 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -23,7 +23,7 @@ # work if this deploys as the same user); # * `loginctl enable-linger ` on the server unless the deploy user # already has it (im's does) — user units need a running user manager; -# * a Postgres the backend can reach, and ~/hezarfen/hezarfen.env (0600) +# * a Postgres the backend can reach, and ~/hezarfen_backend/hezarfen_backend.env (0600) # with at least DATABASE_URL — see deploy/hezarfen.service for the keys. name: VPS deploy @@ -56,10 +56,10 @@ env: # itself is resolved on the server ($HOME), so switching the deploy user # moves the path with it — a baked-in absolute path once kept pointing at # the previous user's home and failed the deploy on permissions. - DEPLOY_SUBDIR: hezarfen + DEPLOY_SUBDIR: hezarfen_backend # The unit reads its secrets from this file on the server; the deploy # never writes it, only checks it exists and holds DATABASE_URL. - ENV_FILE_NAME: hezarfen.env + ENV_FILE_NAME: hezarfen_backend.env # The Postgres the test suite mints its per-test databases on. Credentials # and port match the harness default (HEZARFEN_TEST_DATABASE_URL), so the # tests need no extra environment — only the server, with the raised @@ -260,7 +260,7 @@ jobs: ;; esac deploy_path=$HOME/$1 - # The deploy path is the service's working tree: hezarfen.env and + # The deploy path is the service's working tree: hezarfen_backend.env and # data/ live there and are never touched from here. Only 'current' # is replaced. mkdir -p -- "$deploy_path" diff --git a/deploy/hezarfen.service b/deploy/hezarfen.service index 2ea10b8..8a20940 100644 --- a/deploy/hezarfen.service +++ b/deploy/hezarfen.service @@ -1,9 +1,9 @@ # The systemd user unit the deploy installs to ~/.config/systemd/user/ and -# restarts. The release layout: ~/hezarfen/current/hezarfen_backend with +# restarts. The release layout: ~/hezarfen_backend/current/hezarfen_backend with # migrations/ beside the binary (the app resolves the schema there when the # compile-time checkout path is absent — see migrations_path in the source). # -# ~/hezarfen/hezarfen.env (0600, written once by hand, never by the deploy) +# ~/hezarfen_backend/hezarfen_backend.env (0600, written once by hand, never by the deploy) # carries the deployment's own values and overrides the Environment= lines # below: # DATABASE_URL required — a Postgres with the control database @@ -27,13 +27,13 @@ Wants=network-online.target [Service] Type=simple -ExecStart=%h/hezarfen/current/hezarfen_backend -WorkingDirectory=%h/hezarfen/current +ExecStart=%h/hezarfen_backend/current/hezarfen_backend +WorkingDirectory=%h/hezarfen_backend/current Environment=HOST=127.0.0.1 Environment=PORT=7656 -Environment=FILES_PATH=%h/hezarfen/data/files +Environment=FILES_PATH=%h/hezarfen_backend/data/files Environment=RUST_LOG=info,hezarfen_backend=debug -EnvironmentFile=%h/hezarfen/hezarfen.env +EnvironmentFile=%h/hezarfen_backend/hezarfen_backend.env Restart=on-failure RestartSec=2