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
13 for INSTANCE in lemmy_alpha lemmy_beta lemmy_gamma lemmy_delta lemmy_epsilon; do
14 psql "$LEMMY_DATABASE_URL" -c "CREATE DATABASE $INSTANCE"
17 for INSTANCE in lemmy-alpha lemmy-beta lemmy-gamma lemmy-delta lemmy-epsilon; do
18 echo "127.0.0.1 $INSTANCE" >> /etc/hosts
22 LEMMY_HOSTNAME=lemmy-alpha:8541 \
24 LEMMY_DATABASE_URL=postgres://lemmy:password@database:5432/lemmy_alpha \
25 LEMMY_FEDERATION__ALLOWED_INSTANCES=lemmy-beta,lemmy-gamma,lemmy-delta,lemmy-epsilon \
26 LEMMY_SETUP__ADMIN_USERNAME=lemmy_alpha \
27 LEMMY_SETUP__SITE_NAME=lemmy-alpha \
31 LEMMY_HOSTNAME=lemmy-beta:8551 \
33 LEMMY_DATABASE_URL=postgres://lemmy:password@database:5432/lemmy_beta \
34 LEMMY_FEDERATION__ALLOWED_INSTANCES=lemmy-alpha,lemmy-gamma,lemmy-delta,lemmy-epsilon \
35 LEMMY_SETUP__ADMIN_USERNAME=lemmy_beta \
36 LEMMY_SETUP__SITE_NAME=lemmy-beta \
40 LEMMY_HOSTNAME=lemmy-gamma:8561 \
42 LEMMY_DATABASE_URL=postgres://lemmy:password@database:5432/lemmy_gamma \
43 LEMMY_FEDERATION__ALLOWED_INSTANCES=lemmy-alpha,lemmy-beta,lemmy-delta,lemmy-epsilon \
44 LEMMY_SETUP__ADMIN_USERNAME=lemmy_gamma \
45 LEMMY_SETUP__SITE_NAME=lemmy-gamma \
49 # An instance with only an allowlist for beta
50 LEMMY_HOSTNAME=lemmy-delta:8571 \
52 LEMMY_DATABASE_URL=postgres://lemmy:password@database:5432/lemmy_delta \
53 LEMMY_FEDERATION__ALLOWED_INSTANCES=lemmy-beta \
54 LEMMY_SETUP__ADMIN_USERNAME=lemmy_delta \
55 LEMMY_SETUP__SITE_NAME=lemmy-delta \
59 # An instance who has a blocklist, with lemmy-alpha blocked
60 LEMMY_HOSTNAME=lemmy-epsilon:8581 \
62 LEMMY_DATABASE_URL=postgres://lemmy:password@database:5432/lemmy_epsilon \
63 LEMMY_FEDERATION__BLOCKED_INSTANCES=lemmy-alpha \
64 LEMMY_SETUP__ADMIN_USERNAME=lemmy_epsilon \
65 LEMMY_SETUP__SITE_NAME=lemmy-epsilon \
68 echo "wait for all instances to start"
69 while [[ "$(curl -s -o /dev/null -w '%{http_code}' 'localhost:8541/api/v1/site')" != "200" ]]; do sleep 1; done
70 while [[ "$(curl -s -o /dev/null -w '%{http_code}' 'localhost:8551/api/v1/site')" != "200" ]]; do sleep 1; done
71 while [[ "$(curl -s -o /dev/null -w '%{http_code}' 'localhost:8561/api/v1/site')" != "200" ]]; do sleep 1; done
72 while [[ "$(curl -s -o /dev/null -w '%{http_code}' 'localhost:8571/api/v1/site')" != "200" ]]; do sleep 1; done
73 while [[ "$(curl -s -o /dev/null -w '%{http_code}' 'localhost:8581/api/v1/site')" != "200" ]]; do sleep 1; done