From a86a32fa65592743bdacbdc9cf34a8ada64d1180 Mon Sep 17 00:00:00 2001 From: decentral1se Date: Wed, 15 Feb 2023 01:36:59 +0100 Subject: [PATCH] docs: "modern" abra docs --- README.md | 42 +++++++++++++----------------------------- 1 file changed, 13 insertions(+), 29 deletions(-) diff --git a/README.md b/README.md index 1b43e7e..a879603 100644 --- a/README.md +++ b/README.md @@ -19,46 +19,30 @@ This repository is a copy of [coop-cloud/mastodon](https://git.autonomic.zone/co ## Basic usage -1. Set up Docker Swarm and [`abra`] -1. Deploy [`coop-cloud/traefik`] +Hometown expects secrets to be formatted in a very specific way, so please +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. Follow the [secrets setup docs](#secrets-setup) -1. `abra app config YOURAPPDOMAIN` - be sure to change `DOMAIN` to something that resolves to your Docker swarm box -1. `abra app deploy YOURAPPDOMAIN` to deploy the app +1. `abra app cmd secrets --local` +1. `abra app config ` +1. `abra app deploy ` +1. `abra app cmd setup` -You'll need to run a `docker exec -it /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) -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/_app/_data +chown -R 991:991 /var/lib/docker/volumes/_app/_data ``` And finally, within the `app` container, create an admin account: ``` -export OTP_SECRET=$(cat /run/secrets/otp_secret) -export SECRET_KEY_BASE=$(cat /run/secrets/secret_key_base) -export DB_PASS=$(cat /run/secrets/db_password) -tootctl accounts create --email --confirmed --role admin +abra app cmd 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 secrets --local` - ## Tips & Tricks ### Auto-complete is not working?