docs: "modern" abra docs

This commit is contained in:
decentral1se 2023-02-15 01:36:59 +01:00
parent a325717dcd
commit a86a32fa65
Signed by: decentral1se
GPG Key ID: 03789458B3D0C410
1 changed files with 13 additions and 29 deletions

View File

@ -19,46 +19,30 @@ This repository is a copy of [coop-cloud/mastodon](https://git.autonomic.zone/co
## Basic usage ## Basic usage
1. Set up Docker Swarm and [`abra`] Hometown expects secrets to be formatted in a very specific way, so please
1. Deploy [`coop-cloud/traefik`] choose "No" when prompted to generate secrets for `abra app new mastodon`. The
secrets must be generated outside of `abra` and that is achieved in step 2. See
the [`abra.sh`](./abra.sh) for more.
1. `abra app new mastodon` 1. `abra app new mastodon`
1. Follow the [secrets setup docs](#secrets-setup) 1. `abra app cmd <domain> secrets --local`
1. `abra app config YOURAPPDOMAIN` - be sure to change `DOMAIN` to something that resolves to your Docker swarm box 1. `abra app config <domain>`
1. `abra app deploy YOURAPPDOMAIN` to deploy the app 1. `abra app deploy <domain>`
1. `abra app cmd <domain> setup`
You'll need to run a `docker exec -it <streaming-service-id> /bin/bash` and do the following: Then, on your host (outside of the containers), you'll need to fix permissions
for the volume (see [#2](https://git.autonomic.zone/coop-cloud/hometown/issues/2)):
``` ```
export OTP_SECRET=$(cat /run/secrets/otp_secret) chown -R 991:991 /var/lib/docker/volumes/<domain>_app/_data
export SECRET_KEY_BASE=$(cat /run/secrets/secret_key_base)
export DB_PASS=$(cat /run/secrets/db_password)
bundle exec rake db:setup
```
Then, on your host (outside of the containers), you'll need to fix permissions for the volume (see [#2](https://git.autonomic.zone/coop-cloud/hometown/issues/2)):
```
chown -R 991:991 /var/lib/docker/volumes/<service-name>_app/_data
``` ```
And finally, within the `app` container, create an admin account: And finally, within the `app` container, create an admin account:
``` ```
export OTP_SECRET=$(cat /run/secrets/otp_secret) abra app cmd <domain> admin "<username>" "<email>"
export SECRET_KEY_BASE=$(cat /run/secrets/secret_key_base)
export DB_PASS=$(cat /run/secrets/db_password)
tootctl accounts create <username> --email <email> --confirmed --role admin
``` ```
[`abra`]: https://git.autonomic.zone/autonomic-cooperative/abra
[`coop-cloud/traefik`]: https://git.autonomic.zone/coop-cloud/traefik
## Secrets setup
Mastodon expects secrets generated by specific tools. Uou can run these commands via the scripts interface with `abra`.
`abra app cmd <domain> secrets --local`
## Tips & Tricks ## Tips & Tricks
### Auto-complete is not working? ### Auto-complete is not working?