Added setup commands
This commit is contained in:
parent
d566060e5c
commit
e23f0f9752
47
abra.sh
Normal file
47
abra.sh
Normal file
@ -0,0 +1,47 @@
|
||||
# shellcheck disable=SC2148
|
||||
MASTO_APP_DIR="mastodon/public"
|
||||
|
||||
sub_rake() {
|
||||
# shellcheck disable=SC2034
|
||||
abra__service_="streaming"
|
||||
# Using streaming for rake since it is the least likely to flap
|
||||
sub_app_run rake "$@"
|
||||
}
|
||||
|
||||
sub_tootctl() {
|
||||
# shellcheck disable=SC2034
|
||||
abra__service_="web"
|
||||
# Using streaming for rake since it is the least likely to flap
|
||||
sub_app_run bin/tootctl "$@"
|
||||
}
|
||||
|
||||
sub_setup() {
|
||||
info "Setting up mastodon database"
|
||||
sub_rake "db:setup"
|
||||
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!)"
|
||||
prompt_confirm
|
||||
read -rp "Username: " USERNAME
|
||||
read -rp "Email: " EMAIL
|
||||
warning "Password will be show on screen. Copy this down somewhere! Abra cannot show you this again!"
|
||||
sub_tootctl accounts create $USERNAME --email $EMAIL --confirmed --role admin
|
||||
success "Admin account created!"
|
||||
success "Mastodon should be setup and ready to go!"
|
||||
}
|
||||
|
||||
# Not working atm
|
||||
# abra_backup_app() {
|
||||
# _abra_backup_dir $MASTO_APP_DIR
|
||||
# }
|
||||
|
||||
# abra_restore_app() {
|
||||
# # shellcheck disable=SC2034
|
||||
# {
|
||||
# abra__src_="-"
|
||||
# abra__dst_=$MASTO_APP_DIR
|
||||
# }
|
||||
|
||||
# zcat "$@" | sub_app_cp
|
||||
|
||||
# success "Restored 'app'"
|
||||
# }
|
@ -74,7 +74,7 @@ services:
|
||||
- redis
|
||||
# - es
|
||||
volumes: &appVolume
|
||||
- app:/mastodon/public/system
|
||||
- app:/mastodon
|
||||
# secrets: &secrets
|
||||
# - secret_key_base
|
||||
# - otp_secret
|
||||
|
Loading…
Reference in New Issue
Block a user