Deploy home is hezarfen_backend
Browse files at this commit2d278c6c07d0bdf9487d2492d45e5d6641f5bfa7Parent: 81ac0fb- chore
- deploy home is hezarfen_backend
2 changed files +10 -10
.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 user | 24 | # * `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 deploy | 29 | name: VPS deploy |
| @@ -56,10 +56,10 @@ env: | |||
| 56 | # itself is resolved on the server ($HOME), so switching the deploy user | 56 | # 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 at | 57 | # 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: hezarfen | 59 | + DEPLOY_SUBDIR: hezarfen_backend |
| 60 | # The unit reads its secrets from this file on the server; the deploy | 60 | # 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.env | 62 | + ENV_FILE_NAME: hezarfen_backend.env |
| 63 | # The Postgres the test suite mints its per-test databases on. Credentials | 63 | # The Postgres the test suite mints its per-test databases on. Credentials |
| 64 | # and port match the harness default (HEZARFEN_TEST_DATABASE_URL), so the | 64 | # and port match the harness default (HEZARFEN_TEST_DATABASE_URL), so the |
| 65 | # tests need no extra environment — only the server, with the raised | 65 | # tests need no extra environment — only the server, with the raised |
| @@ -260,7 +260,7 @@ jobs: | |||
| 260 | ;; | 260 | ;; |
| 261 | esac | 261 | esac |
| 262 | deploy_path=$HOME/$1 | 262 | 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 |
| 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/ and | 1 | # 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 |
| 3 | # migrations/ beside the binary (the app resolves the schema there when the | 3 | # 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= lines | 7 | # carries the deployment's own values and overrides the Environment= lines |
| 8 | # below: | 8 | # below: |
| 9 | # DATABASE_URL required — a Postgres with the control database | 9 | # 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=simple | 29 | Type=simple |
| 30 | -ExecStart=%h/hezarfen/current/hezarfen_backend | 30 | +ExecStart=%h/hezarfen_backend/current/hezarfen_backend |
| 31 | -WorkingDirectory=%h/hezarfen/current | 31 | +WorkingDirectory=%h/hezarfen_backend/current |
| 32 | Environment=HOST=127.0.0.1 | 32 | Environment=HOST=127.0.0.1 |
| 33 | Environment=PORT=7656 | 33 | Environment=PORT=7656 |
| 34 | -Environment=FILES_PATH=%h/hezarfen/data/files | 34 | +Environment=FILES_PATH=%h/hezarfen_backend/data/files |
| 35 | Environment=RUST_LOG=info,hezarfen_backend=debug | 35 | Environment=RUST_LOG=info,hezarfen_backend=debug |
| 36 | -EnvironmentFile=%h/hezarfen/hezarfen.env | 36 | +EnvironmentFile=%h/hezarfen_backend/hezarfen_backend.env |
| 37 | Restart=on-failure | 37 | Restart=on-failure |
| 38 | RestartSec=2 | 38 | RestartSec=2 |
| 39 | 39 | ||