diff options
author | reverite <samantha@chalker.io> | 2018-04-03 13:25:58 -0700 |
---|---|---|
committer | reverite <samantha@chalker.io> | 2018-04-03 13:25:58 -0700 |
commit | 96841ad190ebbe86e80aae6ecf11fc3766841818 (patch) | |
tree | d7cee6d2e7081c794a9209b99acd49a778efa314 /deploy/setup-mastodon.sh | |
parent | 7718fb922543162e3bdafebf503a08e84faeb173 (diff) |
reshuffle 2018-04-03
Diffstat (limited to 'deploy/setup-mastodon.sh')
-rwxr-xr-x | deploy/setup-mastodon.sh | 12 |
1 files changed, 10 insertions, 2 deletions
diff --git a/deploy/setup-mastodon.sh b/deploy/setup-mastodon.sh index 239be66..ff06c05 100755 --- a/deploy/setup-mastodon.sh +++ b/deploy/setup-mastodon.sh @@ -1,14 +1,16 @@ #!/bin/bash -[ -z "$YML_LOC" ] && YML_LOC="$HOME" +[ -z "$YML_LOC" ] && YML_LOC="$(pwd)" cd $YML_LOC echo "Setting up the instance..." echo +mkdir -p "$YML_LOC/.docker/mastodon" curl -fsSL https://raw.githubusercontent.com/tootsuite/mastodon/master/.env.production.sample -o "$YML_LOC/.docker/mastodon/.env.production" MUID="$(docker-compose run --rm mstweb id -u 2>/dev/null)" +MGID="$(docker-compose run --rm mstweb id -g 2>/dev/null)" SECRET_KEY_BASE=$(hexdump -vn 64 -e ' /1 "%02x"' /dev/urandom) OTP_SECRET=$(hexdump -vn 64 -e ' /1 "%02x"' /dev/urandom) @@ -18,7 +20,7 @@ sed -i 's|ES_HOST=es|ES_HOST=mstes|' $YML_LOC/.docker/mastodon/.env.production sed -i "s|SECRET_KEY_BASE=|SECRET_KEY_BASE=$SECRET_KEY_BASE|" $YML_LOC/.docker/mastodon/.env.production sed -i "s|OTP_SECRET=|OTP_SECRET=$OTP_SECRET|" $YML_LOC/.docker/mastodon/.env.production sed -i "s|# UID=1000|UID=$MUID|" $YML_LOC/.docker/mastodon/.env.production -sed -i "s|# GID=1000|GID=$MUID|" $YML_LOC/.docker/mastodon/.env.production +sed -i "s|# GID=1000|GID=$MGID|" $YML_LOC/.docker/mastodon/.env.production docker-compose run --rm mstweb rake db:migrate (openssl dhparam -rand /dev/urandom -out $YML_LOC/.docker/nginx/dhparam.pem 4096 2>&1 >/dev/null) & pid=$! @@ -27,3 +29,9 @@ echo echo "Mostly set up. Modify .docker/mastodon/.env.production settings and then" echo "you can do a 'docker-compose up -d' on this instance. OpenSSL is still" echo "running, so wait a bit for it to finish too." +echo +echo "There is an Nginx configuration file in conf/nginx.conf you can use." +echo +echo "Also, when you're going to the instance, register and then run this command:" +echo "docker-compose run --rm mstweb rake mastodon:make_admin USERNAME=yourusername" +echo |