From: Dessalines Date: Tue, 12 Jan 2021 15:42:34 +0000 (-0500) Subject: Adding back start-local-instances. X-Git-Url: http://these/git/%22https:/nerdica.net/%7B%60%24%7BwebArchiveUrl%7D/save/%7B%60%24%7BarchiveTodayUrl%7D/%24%7Bargs.pageFn.jump%20n%7D?a=commitdiff_plain;h=3d4cc32525bd06131811f953d088e81767f72474;p=lemmy.git Adding back start-local-instances. --- diff --git a/docker/federation/start-local-instances.bash b/docker/federation/start-local-instances.bash new file mode 100755 index 00000000..ec2712f1 --- /dev/null +++ b/docker/federation/start-local-instances.bash @@ -0,0 +1,21 @@ +#!/bin/bash +set -e + +sudo docker build ../../ --file ../dev/volume_mount.dockerfile -t lemmy-federation:latest + +for Item in alpha beta gamma delta epsilon ; do + sudo mkdir -p volumes/pictrs_$Item + sudo chown -R 991:991 volumes/pictrs_$Item +done + +sudo docker-compose up -d + +echo "Waiting for Lemmy to start..." +while [[ "$(curl -s -o /dev/null -w '%{http_code}' 'localhost:8541/api/v1/site')" != "200" ]]; do sleep 1; done +while [[ "$(curl -s -o /dev/null -w '%{http_code}' 'localhost:8551/api/v1/site')" != "200" ]]; do sleep 1; done +while [[ "$(curl -s -o /dev/null -w '%{http_code}' 'localhost:8561/api/v1/site')" != "200" ]]; do sleep 1; done +while [[ "$(curl -s -o /dev/null -w '%{http_code}' 'localhost:8571/api/v1/site')" != "200" ]]; do sleep 1; done +while [[ "$(curl -s -o /dev/null -w '%{http_code}' 'localhost:8581/api/v1/site')" != "200" ]]; do sleep 1; done +echo "All instances started." + +sudo docker-compose logs -f