Rip tabs, use env vars and drop old docs
This commit is contained in:
parent
0d70381552
commit
615a2c7f3e
16
README.md
16
README.md
@ -23,7 +23,7 @@ Your self-hosted, globally interconnected microblogging community
|
|||||||
1. `abra app YOURAPPDOMAIN config` - be sure to change `DOMAIN` to something that resolves to
|
1. `abra app YOURAPPDOMAIN config` - be sure to change `DOMAIN` to something that resolves to
|
||||||
your Docker swarm box.
|
your Docker swarm box.
|
||||||
1. Follow the [secrets setup documentation below](#secrets-setup)
|
1. Follow the [secrets setup documentation below](#secrets-setup)
|
||||||
1. Follow the [datbase setup documentation below](#database-setup)
|
1. `abra app YOURAPPDOMAIN setup` to setup the database and create the admin account
|
||||||
1. `abra app YOURAPPDOMAIN deploy --no-domain-poll`. App will fail for now.
|
1. `abra app YOURAPPDOMAIN deploy --no-domain-poll`. App will fail for now.
|
||||||
1. Open the configured domain in your browser to finish set-up. To make an admin account `abra app mastodon run web "bin/tootctl accounts create coolusername --email helo@autonomic.zone --confirmed --role admin"`
|
1. Open the configured domain in your browser to finish set-up. To make an admin account `abra app mastodon run web "bin/tootctl accounts create coolusername --email helo@autonomic.zone --confirmed --role admin"`
|
||||||
|
|
||||||
@ -65,17 +65,3 @@ And finally, to end your whirlwind secrets loading adventure, get the `DB_PASS`
|
|||||||
$ abra app YOURAPPDOMAIN secret generate db_password v1
|
$ abra app YOURAPPDOMAIN secret generate db_password v1
|
||||||
$ abra app YOURDOMAIN secret insert smtp_password v1 YOURSMTPPASSWORD
|
$ abra app YOURDOMAIN secret insert smtp_password v1 YOURSMTPPASSWORD
|
||||||
```
|
```
|
||||||
|
|
||||||
## Database setup
|
|
||||||
|
|
||||||
You need to run `rake db:setup` against the database before the installation will be succesful. To do this, you need to shell into the `streaming` service and run the command while making some environment variables available.
|
|
||||||
|
|
||||||
```
|
|
||||||
$ abra app social.lumbung.space run streaming bash
|
|
||||||
$ 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
|
|
||||||
```
|
|
||||||
|
|
||||||
The rest of the services will then stabilise when they have a connection to the database.
|
|
||||||
|
12
abra.sh
12
abra.sh
@ -3,15 +3,25 @@ export ENTRYPOINT_CONF_VERSION=v1
|
|||||||
#MASTO_APP_DIR="mastodon/public"
|
#MASTO_APP_DIR="mastodon/public"
|
||||||
|
|
||||||
sub_rake() {
|
sub_rake() {
|
||||||
|
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)
|
||||||
|
|
||||||
# shellcheck disable=SC2034
|
# shellcheck disable=SC2034
|
||||||
abra__service_="streaming"
|
abra__service_="streaming"
|
||||||
|
|
||||||
# Using streaming for rake since it is the least likely to flap
|
# Using streaming for rake since it is the least likely to flap
|
||||||
sub_app_run rake "$@"
|
sub_app_run rake "$@"
|
||||||
}
|
}
|
||||||
|
|
||||||
sub_tootctl() {
|
sub_tootctl() {
|
||||||
|
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)
|
||||||
|
|
||||||
# shellcheck disable=SC2034
|
# shellcheck disable=SC2034
|
||||||
abra__service_="web"
|
abra__service_="web"
|
||||||
|
|
||||||
# Using streaming for rake since it is the least likely to flap
|
# Using streaming for rake since it is the least likely to flap
|
||||||
sub_app_run bin/tootctl "$@"
|
sub_app_run bin/tootctl "$@"
|
||||||
}
|
}
|
||||||
@ -19,9 +29,11 @@ sub_tootctl() {
|
|||||||
sub_setup() {
|
sub_setup() {
|
||||||
info "Setting up mastodon database"
|
info "Setting up mastodon database"
|
||||||
silence
|
silence
|
||||||
|
|
||||||
sub_rake "db:setup"
|
sub_rake "db:setup"
|
||||||
unsilence
|
unsilence
|
||||||
success "Mastodon's database is now up! 'web' and 'sidekiq' services should now stop failing."
|
success "Mastodon's database is now up! 'web' and 'sidekiq' services should now stop failing."
|
||||||
|
|
||||||
echo "Do you want to create an admin user? (Extremely recommended!)"
|
echo "Do you want to create an admin user? (Extremely recommended!)"
|
||||||
prompt_confirm
|
prompt_confirm
|
||||||
read -rp "Username: " USERNAME
|
read -rp "Username: " USERNAME
|
||||||
|
Loading…
Reference in New Issue
Block a user