4 export LEMMY_JWT_SECRET=changeme
5 export LEMMY_FEDERATION__ENABLED=true
6 export LEMMY_TLS_ENABLED=false
7 export LEMMY_SETUP__ADMIN_PASSWORD=lemmy
8 export LEMMY_RATE_LIMIT__POST=99999
9 export LEMMY_RATE_LIMIT__REGISTER=99999
10 export LEMMY_CAPTCHA__ENABLED=false
11 export RUST_BACKTRACE=1
14 for INSTANCE in lemmy_alpha lemmy_beta lemmy_gamma lemmy_delta lemmy_epsilon; do
15 psql "$LEMMY_DATABASE_URL" -c "CREATE DATABASE $INSTANCE"
19 LEMMY_HOSTNAME=lemmy-alpha:8541 \
21 LEMMY_DATABASE_URL=postgres://lemmy:password@database:5432/lemmy_alpha \
22 LEMMY_FEDERATION__ALLOWED_INSTANCES=lemmy-beta,lemmy-gamma,lemmy-delta,lemmy-epsilon \
23 LEMMY_SETUP__ADMIN_USERNAME=lemmy_alpha \
24 LEMMY_SETUP__SITE_NAME=lemmy-alpha \
28 LEMMY_HOSTNAME=lemmy-beta:8551 \
30 LEMMY_DATABASE_URL=postgres://lemmy:password@database:5432/lemmy_beta \
31 LEMMY_FEDERATION__ALLOWED_INSTANCES=lemmy-alpha,lemmy-gamma,lemmy-delta,lemmy-epsilon \
32 LEMMY_SETUP__ADMIN_USERNAME=lemmy_beta \
33 LEMMY_SETUP__SITE_NAME=lemmy-beta \
37 LEMMY_HOSTNAME=lemmy-gamma:8561 \
39 LEMMY_DATABASE_URL=postgres://lemmy:password@database:5432/lemmy_gamma \
40 LEMMY_FEDERATION__ALLOWED_INSTANCES=lemmy-alpha,lemmy-beta,lemmy-delta,lemmy-epsilon \
41 LEMMY_SETUP__ADMIN_USERNAME=lemmy_gamma \
42 LEMMY_SETUP__SITE_NAME=lemmy-gamma \
46 # An instance with only an allowlist for beta
47 LEMMY_HOSTNAME=lemmy-delta:8571 \
49 LEMMY_DATABASE_URL=postgres://lemmy:password@database:5432/lemmy_delta \
50 LEMMY_FEDERATION__ALLOWED_INSTANCES=lemmy-beta \
51 LEMMY_SETUP__ADMIN_USERNAME=lemmy_delta \
52 LEMMY_SETUP__SITE_NAME=lemmy-delta \
56 # An instance who has a blocklist, with lemmy-alpha blocked
57 LEMMY_HOSTNAME=lemmy-epsilon:8581 \
59 LEMMY_DATABASE_URL=postgres://lemmy:password@database:5432/lemmy_epsilon \
60 LEMMY_FEDERATION__BLOCKED_INSTANCES=lemmy-alpha \
61 LEMMY_SETUP__ADMIN_USERNAME=lemmy_epsilon \
62 LEMMY_SETUP__SITE_NAME=lemmy-epsilon \
65 echo "wait for all instances to start"
66 while [[ "$(curl -s -o /dev/null -w '%{http_code}' 'localhost:8541/api/v1/site')" != "200" ]]; do sleep 1; done
67 while [[ "$(curl -s -o /dev/null -w '%{http_code}' 'localhost:8551/api/v1/site')" != "200" ]]; do sleep 1; done
68 while [[ "$(curl -s -o /dev/null -w '%{http_code}' 'localhost:8561/api/v1/site')" != "200" ]]; do sleep 1; done
69 while [[ "$(curl -s -o /dev/null -w '%{http_code}' 'localhost:8571/api/v1/site')" != "200" ]]; do sleep 1; done
70 while [[ "$(curl -s -o /dev/null -w '%{http_code}' 'localhost:8581/api/v1/site')" != "200" ]]; do sleep 1; done