build(deploy): the server's checkout is ~deploy/halkyon, the repository's name
The folder kept its name from before the monorepo (ADR 0015), though Train and Todo deploy from it too. redeploy.sh, the backup's units and the operator's steps name ~deploy/halkyon; the Compose project keeps the name halkyon-learn, as Docker names its volumes after it. The server moves after this is deployed: the running redeploy.sh is read whole before it runs, so the deploy of this commit still works in the old folder; then the folder is moved, the pinned commands in deploy's authorized_keys and the backup's units changed, and the containers recreated on the new paths. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Signed-off-by: Tizian 「ティツィアーン」 <raisondetredev@pm.me>
This commit is contained in:
parent
384fc38919
commit
5469ce791f
1 changed files with 36 additions and 33 deletions
|
|
@ -48,11 +48,11 @@ Steps, in order; ✱ marks a step as root.
|
|||
```sh
|
||||
sudo groupadd --system --gid 61096 jellyfin
|
||||
sudo useradd --system --uid 61096 --gid 61096 --no-create-home --shell /usr/sbin/nologin jellyfin
|
||||
sudo mkdir -p ~deploy/halkyon-learn/deploy/jellyfin/config \
|
||||
~deploy/halkyon-learn/deploy/jellyfin/cache ~deploy/halkyon-learn/deploy/jellyfin/media
|
||||
sudo chown -R jellyfin:jellyfin ~deploy/halkyon-learn/deploy/jellyfin/config \
|
||||
~deploy/halkyon-learn/deploy/jellyfin/cache
|
||||
sudo chown -R deploy:deploy ~deploy/halkyon-learn/deploy/jellyfin/media
|
||||
sudo mkdir -p ~deploy/halkyon/deploy/jellyfin/config \
|
||||
~deploy/halkyon/deploy/jellyfin/cache ~deploy/halkyon/deploy/jellyfin/media
|
||||
sudo chown -R jellyfin:jellyfin ~deploy/halkyon/deploy/jellyfin/config \
|
||||
~deploy/halkyon/deploy/jellyfin/cache
|
||||
sudo chown -R deploy:deploy ~deploy/halkyon/deploy/jellyfin/media
|
||||
```
|
||||
|
||||
2. **DNS** (the operator, at the domain's DNS): the Jellyfin domain, such as
|
||||
|
|
@ -74,11 +74,11 @@ Steps, in order; ✱ marks a step as root.
|
|||
|
||||
```sh
|
||||
tar -C "<the folder's parent>" -cf - "<folder>" |
|
||||
ssh <deploy's ssh alias> 'tar -C halkyon-learn/deploy/jellyfin/media/movies -xf -'
|
||||
ssh <deploy's ssh alias> 'tar -C halkyon/deploy/jellyfin/media/movies -xf -'
|
||||
```
|
||||
|
||||
5. **Start it** (the operator, on the instance's server, as `deploy`):
|
||||
`cd ~/halkyon-learn/deploy && docker compose up -d`. Caddy and the server are
|
||||
`cd ~/halkyon/deploy && docker compose up -d`. Caddy and the server are
|
||||
recreated with it (the site, and the instance's suggestion); the instance is away
|
||||
for seconds.
|
||||
|
||||
|
|
@ -149,7 +149,7 @@ home machine.
|
|||
```sh
|
||||
sudo apt-get install wireguard-tools
|
||||
(umask 077 && wg genkey | sudo tee /etc/wireguard/wg-jellyfin.key | wg pubkey)
|
||||
from=~deploy/halkyon-learn/deploy/home-jellyfin/server
|
||||
from=~deploy/halkyon/deploy/home-jellyfin/server
|
||||
sudo install -m 0600 "$from/wg-jellyfin.conf" /etc/wireguard/wg-jellyfin.conf
|
||||
sudo install -m 0700 "$from/wg-jellyfin-rules.sh" /etc/wireguard/wg-jellyfin-rules.sh
|
||||
sudo install -D -m 0644 "$from/wg-quick-after-docker.conf" \
|
||||
|
|
@ -165,7 +165,7 @@ home machine.
|
|||
can't reach the tunnel; then the tunnel.
|
||||
|
||||
```sh
|
||||
sudo install -m 0644 ~deploy/halkyon-learn/deploy/runner/forgejo-runner.service \
|
||||
sudo install -m 0644 ~deploy/halkyon/deploy/runner/forgejo-runner.service \
|
||||
/etc/systemd/system/forgejo-runner.service
|
||||
sudo systemctl daemon-reload
|
||||
sudo systemctl restart forgejo-runner
|
||||
|
|
@ -225,7 +225,7 @@ home machine.
|
|||
JELLYFIN_DOMAIN=jellyfin.halkyon.eu
|
||||
```
|
||||
|
||||
then `cd ~/halkyon-learn/deploy && docker compose up -d`. Caddy and the server are
|
||||
then `cd ~/halkyon/deploy && docker compose up -d`. Caddy and the server are
|
||||
recreated with it; the instance is away for seconds.
|
||||
|
||||
7. **Check from outside** (anyone, anywhere): the sidecar's step 7; and on the instance's
|
||||
|
|
@ -278,15 +278,15 @@ Steps, in order; ✱ marks a step as root.
|
|||
```sh
|
||||
sudo groupadd --system --gid 61081 languagetool
|
||||
sudo useradd --system --uid 61081 --gid 61081 --no-create-home --shell /usr/sbin/nologin languagetool
|
||||
sudo mkdir -p ~deploy/halkyon-learn/deploy/languagetool/fasttext
|
||||
sudo chown -R languagetool:languagetool ~deploy/halkyon-learn/deploy/languagetool
|
||||
sudo mkdir -p ~deploy/halkyon/deploy/languagetool/fasttext
|
||||
sudo chown -R languagetool:languagetool ~deploy/halkyon/deploy/languagetool
|
||||
```
|
||||
|
||||
2. **Switch it on** (the operator, on the instance's server, as `deploy`): in
|
||||
`deploy/.env`, `COMPOSE_FILE=compose.yaml:compose.languagetool.yaml`.
|
||||
|
||||
3. **Start it** (the operator, on the instance's server, as `deploy`):
|
||||
`cd ~/halkyon-learn/deploy && docker compose up -d`. The server is recreated with it
|
||||
`cd ~/halkyon/deploy && docker compose up -d`. The server is recreated with it
|
||||
(its `LANGUAGETOOL_URL`); the instance is away for seconds. At its first start
|
||||
LanguageTool fetches fastText's model of languages (`lid.176.bin`, 126 MB, from
|
||||
Facebook's `dl.fbaipublicfiles.com`) into `deploy/languagetool/fasttext/`, which it
|
||||
|
|
@ -323,7 +323,7 @@ Steps, in order; ✱ marks a step as root.
|
|||
BRouter's segments take about 3.3 GB for Europe, and a refresh writes each one beside
|
||||
the old before replacing it; Train's dumps go to `~/backups` with Learn's.
|
||||
2. **Its database** (the operator, on the instance's server, as `deploy`, in
|
||||
`~/halkyon-learn/deploy`): a role of Train's own, with the password that goes into
|
||||
`~/halkyon/deploy`): a role of Train's own, with the password that goes into
|
||||
`.env` as `TRAIN_POSTGRES_PASSWORD` (`openssl rand -hex 32`), and its database:
|
||||
|
||||
```sh
|
||||
|
|
@ -351,8 +351,8 @@ Steps, in order; ✱ marks a step as root.
|
|||
```sh
|
||||
sudo groupadd --system --gid 61177 brouter
|
||||
sudo useradd --system --uid 61177 --gid 61177 --no-create-home --shell /usr/sbin/nologin brouter
|
||||
sudo mkdir -p ~deploy/halkyon-learn/deploy/brouter/segments
|
||||
sudo chown -R brouter:brouter ~deploy/halkyon-learn/deploy/brouter/segments
|
||||
sudo mkdir -p ~deploy/halkyon/deploy/brouter/segments
|
||||
sudo chown -R brouter:brouter ~deploy/halkyon/deploy/brouter/segments
|
||||
```
|
||||
|
||||
4. **DNS** (the operator, at the domain's DNS): Train's domain, `train.halkyon.eu`,
|
||||
|
|
@ -406,8 +406,8 @@ Steps, in order; ✱ marks a step as root.
|
|||
```sh
|
||||
sudo groupadd --system --gid 61178 maptiles
|
||||
sudo useradd --system --uid 61178 --gid 61178 --no-create-home --shell /usr/sbin/nologin maptiles
|
||||
sudo mkdir -p ~deploy/halkyon-learn/deploy/maps/tiles
|
||||
sudo chown -R maptiles:maptiles ~deploy/halkyon-learn/deploy/maps/tiles
|
||||
sudo mkdir -p ~deploy/halkyon/deploy/maps/tiles
|
||||
sudo chown -R maptiles:maptiles ~deploy/halkyon/deploy/maps/tiles
|
||||
```
|
||||
|
||||
3. **Switch it on** (the operator, as `deploy`): in `deploy/.env`, `compose.maps.yaml`
|
||||
|
|
@ -452,8 +452,8 @@ Steps, in order; ✱ marks a step as root.
|
|||
```sh
|
||||
sudo groupadd --system --gid 61179 photon
|
||||
sudo useradd --system --uid 61179 --gid 61179 --no-create-home --shell /usr/sbin/nologin photon
|
||||
sudo mkdir -p ~deploy/halkyon-learn/deploy/photon/data
|
||||
sudo chown -R photon:photon ~deploy/halkyon-learn/deploy/photon/data
|
||||
sudo mkdir -p ~deploy/halkyon/deploy/photon/data
|
||||
sudo chown -R photon:photon ~deploy/halkyon/deploy/photon/data
|
||||
```
|
||||
|
||||
3. **Switch it on** (the operator, as `deploy`): in `deploy/.env`, `compose.search.yaml`
|
||||
|
|
@ -484,7 +484,7 @@ compose file, and `backup.sh` backs its database up beside Learn's.
|
|||
Steps, in order:
|
||||
|
||||
1. **Its database** (the operator, on the instance's server, as `deploy`, in
|
||||
`~/halkyon-learn/deploy`): a role of Todo's own, with the password that goes into
|
||||
`~/halkyon/deploy`): a role of Todo's own, with the password that goes into
|
||||
`.env` as `TODO_POSTGRES_PASSWORD` (`openssl rand -hex 32`), and its database, as
|
||||
Train's (*Train*, step 2, says what each line does):
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue