deploy: SSH roll to linuxuser@elektrine.com with shared Docker network
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:
parent
9cd56a7770
commit
aa43ce2562
3 changed files with 164 additions and 0 deletions
22
README.md
22
README.md
|
|
@ -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`)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue