4 # change folder so the config can be read from the default location
7 export LEMMY_JWT_SECRET=changeme
8 export LEMMY_FEDERATION__ENABLED=true
9 export LEMMY_TLS_ENABLED=false
10 export LEMMY_SETUP__ADMIN_PASSWORD=lemmy
11 export LEMMY_RATE_LIMIT__POST=99999
12 export LEMMY_RATE_LIMIT__REGISTER=99999
13 export LEMMY_CAPTCHA__ENABLED=false
14 export RUST_BACKTRACE=1
18 LEMMY_HOSTNAME=lemmy-alpha:8541 \
20 LEMMY_DATABASE_URL=postgres://lemmy:password@postgres_alpha:5432/lemmy \
21 LEMMY_FEDERATION__ALLOWED_INSTANCES=lemmy-beta,lemmy-gamma,lemmy-delta,lemmy-epsilon \
22 LEMMY_SETUP__ADMIN_USERNAME=lemmy_alpha \
23 LEMMY_SETUP__SITE_NAME=lemmy-alpha \
24 target/debug/lemmy_server &
27 LEMMY_HOSTNAME=lemmy-beta:8551 \
29 LEMMY_DATABASE_URL=postgres://lemmy:password@postgres_beta:5432/lemmy \
30 LEMMY_FEDERATION__ALLOWED_INSTANCES=lemmy-alpha,lemmy-gamma,lemmy-delta,lemmy-epsilon \
31 LEMMY_SETUP__ADMIN_USERNAME=lemmy_beta \
32 LEMMY_SETUP__SITE_NAME=lemmy-beta \
33 target/debug/lemmy_server &
36 LEMMY_HOSTNAME=lemmy-gamma:8561 \
38 LEMMY_DATABASE_URL=postgres://lemmy:password@postgres_gamma:5432/lemmy \
39 LEMMY_FEDERATION__ALLOWED_INSTANCES=lemmy-alpha,lemmy-beta,lemmy-delta,lemmy-epsilon \
40 LEMMY_SETUP__ADMIN_USERNAME=lemmy_gamma \
41 LEMMY_SETUP__SITE_NAME=lemmy-gamma \
42 target/debug/lemmy_server &
45 # An instance with only an allowlist for beta
46 LEMMY_HOSTNAME=lemmy-delta:8571 \
48 LEMMY_DATABASE_URL=postgres://lemmy:password@postgres_delta:5432/lemmy \
49 LEMMY_FEDERATION__ALLOWED_INSTANCES=lemmy-beta \
50 LEMMY_SETUP__ADMIN_USERNAME=lemmy_delta \
51 LEMMY_SETUP__SITE_NAME=lemmy-delta \
52 target/debug/lemmy_server &
55 # An instance who has a blocklist, with lemmy-alpha blocked
56 LEMMY_HOSTNAME=lemmy-epsilon:8581 \
58 LEMMY_DATABASE_URL=postgres://lemmy:password@postgres_epsilon:5432/lemmy \
59 LEMMY_FEDERATION__BLOCKED_INSTANCES=lemmy-alpha \
60 LEMMY_SETUP__ADMIN_USERNAME=lemmy_epsilon \
61 LEMMY_SETUP__SITE_NAME=lemmy-epsilon \
62 target/debug/lemmy_server &
64 echo "wait for all instances to start"
65 while [[ "$(curl -s -o /dev/null -w '%{http_code}' 'localhost:8541/api/v1/site')" != "200" ]]; do sleep 1; done
66 while [[ "$(curl -s -o /dev/null -w '%{http_code}' 'localhost:8551/api/v1/site')" != "200" ]]; do sleep 1; done
67 while [[ "$(curl -s -o /dev/null -w '%{http_code}' 'localhost:8561/api/v1/site')" != "200" ]]; do sleep 1; done
68 while [[ "$(curl -s -o /dev/null -w '%{http_code}' 'localhost:8571/api/v1/site')" != "200" ]]; do sleep 1; done
69 while [[ "$(curl -s -o /dev/null -w '%{http_code}' 'localhost:8581/api/v1/site')" != "200" ]]; do sleep 1; done