# Hometown A supported fork of Mastodon that provides local posting and a wider range of content types. This repository is a copy of [coop-cloud/mastodon](https://git.autonomic.zone/coop-cloud/mastodon) but with a fresh README and some Hometown specific configuration. It seems like a good idea to keep the deployment separate since the apps may diverge in their deployment or configuration instructions at some point despite best wishes to remain as mainline Mastodon as possible. * **Category**: Apps * **Status**: * **Image**: [`decentral1se/hometown`](https://hub.docker.com/r/decentral1se/hometown) * **Healthcheck**: * **Backups**: * **Email**: * **Tests**: * **SSO**: ## Basic usage 1. Set up Docker Swarm and [`abra`] 1. Deploy [`coop-cloud/traefik`] 1. `abra app new mastodon` 1. Follow the [secrets setup docs](#secrets-setup) 1. `abra app YOURAPPDOMAIN config` - be sure to change `DOMAIN` to something that resolves to your Docker swarm box 1. `abra app YOURAPPDOMAIN deploy` to deploy the app You'll need to run a `docker exec -it /bin/bash` and do the following: ``` 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 ``` 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`]: 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`