deploy: SSH roll to linuxuser@elektrine.com with shared Docker network
All checks were successful
CI / Test and build (push) Successful in 1m43s
Deploy / Deploy over SSH (push) Successful in 1m33s

Add scripts/deploy.sh to build/start Magpie and ensure it joins
elektrine-magpie-shared (alias magpie) so Elektrine can reach magpie:8090.
Forgejo Actions rsyncs and runs the script on every main push.
This commit is contained in:
Maxfield Luke 2026-07-29 05:41:52 -04:00
parent 9cd56a7770
commit aa43ce2562
3 changed files with 164 additions and 0 deletions

View file

@ -269,3 +269,25 @@ make release
```
Artifacts are written to `dist/`, with checksums in `dist/SHA256SUMS`.
## Production deploy (same host as Elektrine)
Magpie runs as a separate Compose project on the Elektrine host and joins the
shared Docker network `elektrine-magpie-shared` so Elektrine services can reach
`http://magpie:8090`.
```sh
# on the server (linuxuser)
cd /opt/magpie
./scripts/deploy.sh
```
Forgejo Actions (push to `main`) rsyncs to `linuxuser@elektrine.com:/opt/magpie`
and runs that script. Elektrine deploy re-attaches Magpie to the shared network
every time via `ensure_magpie_shared_network`.
Required on the host:
- `/opt/magpie/.env.production` (not in git)
- Docker (or passwordless `sudo docker`) for `linuxuser`
- Shared network name: `MAGPIE_DOCKER_NETWORK` (default `elektrine-magpie-shared`)