Update local federation test setup
This commit is contained in:
parent
80b6b8f9d9
commit
91de139c73
2 changed files with 75 additions and 40 deletions
75
docker/federation/docker-compose.yml
vendored
75
docker/federation/docker-compose.yml
vendored
|
@ -15,11 +15,11 @@ services:
|
||||||
depends_on:
|
depends_on:
|
||||||
- pictrs
|
- pictrs
|
||||||
- iframely
|
- iframely
|
||||||
- lemmy-alpha
|
- lemmy-alpha-ui
|
||||||
- lemmy-beta
|
- lemmy-beta-ui
|
||||||
- lemmy-gamma
|
- lemmy-gamma-ui
|
||||||
- lemmy-delta
|
- lemmy-delta-ui
|
||||||
- lemmy-epsilon
|
- lemmy-epsilon-ui
|
||||||
|
|
||||||
pictrs:
|
pictrs:
|
||||||
restart: always
|
restart: always
|
||||||
|
@ -28,17 +28,24 @@ services:
|
||||||
volumes:
|
volumes:
|
||||||
- ./volumes/pictrs_alpha:/mnt
|
- ./volumes/pictrs_alpha:/mnt
|
||||||
|
|
||||||
|
lemmy-alpha-ui:
|
||||||
|
image: dessalines/lemmy-isomorphic-ui:v0.0.7
|
||||||
|
environment:
|
||||||
|
- LEMMY_INTERNAL_HOST=lemmy-alpha:8541
|
||||||
|
- LEMMY_EXTERNAL_HOST=localhost:8541
|
||||||
|
- LEMMY_HTTPS=false
|
||||||
|
depends_on:
|
||||||
|
- lemmy-alpha
|
||||||
lemmy-alpha:
|
lemmy-alpha:
|
||||||
image: lemmy-federation:latest
|
image: lemmy-federation:latest
|
||||||
environment:
|
environment:
|
||||||
- LEMMY_HOSTNAME=lemmy-alpha:8540
|
- LEMMY_HOSTNAME=lemmy-alpha:8541
|
||||||
- LEMMY_DATABASE_URL=postgres://lemmy:password@postgres_alpha:5432/lemmy
|
- LEMMY_DATABASE_URL=postgres://lemmy:password@postgres_alpha:5432/lemmy
|
||||||
- LEMMY_JWT_SECRET=changeme
|
- LEMMY_JWT_SECRET=changeme
|
||||||
- LEMMY_FRONT_END_DIR=/app/dist
|
|
||||||
- LEMMY_FEDERATION__ENABLED=true
|
- LEMMY_FEDERATION__ENABLED=true
|
||||||
- LEMMY_FEDERATION__TLS_ENABLED=false
|
- LEMMY_FEDERATION__TLS_ENABLED=false
|
||||||
- LEMMY_FEDERATION__ALLOWED_INSTANCES=lemmy-beta,lemmy-gamma,lemmy-delta,lemmy-epsilon
|
- LEMMY_FEDERATION__ALLOWED_INSTANCES=lemmy-beta,lemmy-gamma,lemmy-delta,lemmy-epsilon
|
||||||
- LEMMY_PORT=8540
|
- LEMMY_PORT=8541
|
||||||
- LEMMY_SETUP__ADMIN_USERNAME=lemmy_alpha
|
- LEMMY_SETUP__ADMIN_USERNAME=lemmy_alpha
|
||||||
- LEMMY_SETUP__ADMIN_PASSWORD=lemmy
|
- LEMMY_SETUP__ADMIN_PASSWORD=lemmy
|
||||||
- LEMMY_SETUP__SITE_NAME=lemmy-alpha
|
- LEMMY_SETUP__SITE_NAME=lemmy-alpha
|
||||||
|
@ -58,17 +65,24 @@ services:
|
||||||
volumes:
|
volumes:
|
||||||
- ./volumes/postgres_alpha:/var/lib/postgresql/data
|
- ./volumes/postgres_alpha:/var/lib/postgresql/data
|
||||||
|
|
||||||
|
lemmy-beta-ui:
|
||||||
|
image: dessalines/lemmy-isomorphic-ui:v0.0.7
|
||||||
|
environment:
|
||||||
|
- LEMMY_INTERNAL_HOST=lemmy-beta:8551
|
||||||
|
- LEMMY_EXTERNAL_HOST=localhost:8551
|
||||||
|
- LEMMY_HTTPS=false
|
||||||
|
depends_on:
|
||||||
|
- lemmy-beta
|
||||||
lemmy-beta:
|
lemmy-beta:
|
||||||
image: lemmy-federation:latest
|
image: lemmy-federation:latest
|
||||||
environment:
|
environment:
|
||||||
- LEMMY_HOSTNAME=lemmy-beta:8550
|
- LEMMY_HOSTNAME=lemmy-beta:8551
|
||||||
- LEMMY_DATABASE_URL=postgres://lemmy:password@postgres_beta:5432/lemmy
|
- LEMMY_DATABASE_URL=postgres://lemmy:password@postgres_beta:5432/lemmy
|
||||||
- LEMMY_JWT_SECRET=changeme
|
- LEMMY_JWT_SECRET=changeme
|
||||||
- LEMMY_FRONT_END_DIR=/app/dist
|
|
||||||
- LEMMY_FEDERATION__ENABLED=true
|
- LEMMY_FEDERATION__ENABLED=true
|
||||||
- LEMMY_FEDERATION__TLS_ENABLED=false
|
- LEMMY_FEDERATION__TLS_ENABLED=false
|
||||||
- LEMMY_FEDERATION__ALLOWED_INSTANCES=lemmy-alpha,lemmy-gamma,lemmy-delta,lemmy-epsilon
|
- LEMMY_FEDERATION__ALLOWED_INSTANCES=lemmy-alpha,lemmy-gamma,lemmy-delta,lemmy-epsilon
|
||||||
- LEMMY_PORT=8550
|
- LEMMY_PORT=8551
|
||||||
- LEMMY_SETUP__ADMIN_USERNAME=lemmy_beta
|
- LEMMY_SETUP__ADMIN_USERNAME=lemmy_beta
|
||||||
- LEMMY_SETUP__ADMIN_PASSWORD=lemmy
|
- LEMMY_SETUP__ADMIN_PASSWORD=lemmy
|
||||||
- LEMMY_SETUP__SITE_NAME=lemmy-beta
|
- LEMMY_SETUP__SITE_NAME=lemmy-beta
|
||||||
|
@ -88,17 +102,24 @@ services:
|
||||||
volumes:
|
volumes:
|
||||||
- ./volumes/postgres_beta:/var/lib/postgresql/data
|
- ./volumes/postgres_beta:/var/lib/postgresql/data
|
||||||
|
|
||||||
|
lemmy-gamma-ui:
|
||||||
|
image: dessalines/lemmy-isomorphic-ui:v0.0.7
|
||||||
|
environment:
|
||||||
|
- LEMMY_INTERNAL_HOST=lemmy-gamma:8561
|
||||||
|
- LEMMY_EXTERNAL_HOST=localhost:8561
|
||||||
|
- LEMMY_HTTPS=false
|
||||||
|
depends_on:
|
||||||
|
- lemmy-gamma
|
||||||
lemmy-gamma:
|
lemmy-gamma:
|
||||||
image: lemmy-federation:latest
|
image: lemmy-federation:latest
|
||||||
environment:
|
environment:
|
||||||
- LEMMY_HOSTNAME=lemmy-gamma:8560
|
- LEMMY_HOSTNAME=lemmy-gamma:8561
|
||||||
- LEMMY_DATABASE_URL=postgres://lemmy:password@postgres_gamma:5432/lemmy
|
- LEMMY_DATABASE_URL=postgres://lemmy:password@postgres_gamma:5432/lemmy
|
||||||
- LEMMY_JWT_SECRET=changeme
|
- LEMMY_JWT_SECRET=changeme
|
||||||
- LEMMY_FRONT_END_DIR=/app/dist
|
|
||||||
- LEMMY_FEDERATION__ENABLED=true
|
- LEMMY_FEDERATION__ENABLED=true
|
||||||
- LEMMY_FEDERATION__TLS_ENABLED=false
|
- LEMMY_FEDERATION__TLS_ENABLED=false
|
||||||
- LEMMY_FEDERATION__ALLOWED_INSTANCES=lemmy-alpha,lemmy-beta,lemmy-delta,lemmy-epsilon
|
- LEMMY_FEDERATION__ALLOWED_INSTANCES=lemmy-alpha,lemmy-beta,lemmy-delta,lemmy-epsilon
|
||||||
- LEMMY_PORT=8560
|
- LEMMY_PORT=8561
|
||||||
- LEMMY_SETUP__ADMIN_USERNAME=lemmy_gamma
|
- LEMMY_SETUP__ADMIN_USERNAME=lemmy_gamma
|
||||||
- LEMMY_SETUP__ADMIN_PASSWORD=lemmy
|
- LEMMY_SETUP__ADMIN_PASSWORD=lemmy
|
||||||
- LEMMY_SETUP__SITE_NAME=lemmy-gamma
|
- LEMMY_SETUP__SITE_NAME=lemmy-gamma
|
||||||
|
@ -119,17 +140,24 @@ services:
|
||||||
- ./volumes/postgres_gamma:/var/lib/postgresql/data
|
- ./volumes/postgres_gamma:/var/lib/postgresql/data
|
||||||
|
|
||||||
# An instance with only an allowlist for beta
|
# An instance with only an allowlist for beta
|
||||||
|
lemmy-delta-ui:
|
||||||
|
image: dessalines/lemmy-isomorphic-ui:v0.0.7
|
||||||
|
environment:
|
||||||
|
- LEMMY_INTERNAL_HOST=lemmy-delta:8571
|
||||||
|
- LEMMY_EXTERNAL_HOST=localhost:8571
|
||||||
|
- LEMMY_HTTPS=false
|
||||||
|
depends_on:
|
||||||
|
- lemmy-delta
|
||||||
lemmy-delta:
|
lemmy-delta:
|
||||||
image: lemmy-federation:latest
|
image: lemmy-federation:latest
|
||||||
environment:
|
environment:
|
||||||
- LEMMY_HOSTNAME=lemmy-delta:8570
|
- LEMMY_HOSTNAME=lemmy-delta:8571
|
||||||
- LEMMY_DATABASE_URL=postgres://lemmy:password@postgres_delta:5432/lemmy
|
- LEMMY_DATABASE_URL=postgres://lemmy:password@postgres_delta:5432/lemmy
|
||||||
- LEMMY_JWT_SECRET=changeme
|
- LEMMY_JWT_SECRET=changeme
|
||||||
- LEMMY_FRONT_END_DIR=/app/dist
|
|
||||||
- LEMMY_FEDERATION__ENABLED=true
|
- LEMMY_FEDERATION__ENABLED=true
|
||||||
- LEMMY_FEDERATION__TLS_ENABLED=false
|
- LEMMY_FEDERATION__TLS_ENABLED=false
|
||||||
- LEMMY_FEDERATION__ALLOWED_INSTANCES=lemmy-beta
|
- LEMMY_FEDERATION__ALLOWED_INSTANCES=lemmy-beta
|
||||||
- LEMMY_PORT=8570
|
- LEMMY_PORT=8571
|
||||||
- LEMMY_SETUP__ADMIN_USERNAME=lemmy_delta
|
- LEMMY_SETUP__ADMIN_USERNAME=lemmy_delta
|
||||||
- LEMMY_SETUP__ADMIN_PASSWORD=lemmy
|
- LEMMY_SETUP__ADMIN_PASSWORD=lemmy
|
||||||
- LEMMY_SETUP__SITE_NAME=lemmy-delta
|
- LEMMY_SETUP__SITE_NAME=lemmy-delta
|
||||||
|
@ -150,17 +178,24 @@ services:
|
||||||
- ./volumes/postgres_delta:/var/lib/postgresql/data
|
- ./volumes/postgres_delta:/var/lib/postgresql/data
|
||||||
|
|
||||||
# An instance who has a blocklist, with lemmy-alpha blocked
|
# An instance who has a blocklist, with lemmy-alpha blocked
|
||||||
|
lemmy-epsilon-ui:
|
||||||
|
image: dessalines/lemmy-isomorphic-ui:v0.0.7
|
||||||
|
environment:
|
||||||
|
- LEMMY_INTERNAL_HOST=lemmy-epsilon:8581
|
||||||
|
- LEMMY_EXTERNAL_HOST=localhost:8581
|
||||||
|
- LEMMY_HTTPS=false
|
||||||
|
depends_on:
|
||||||
|
- lemmy-epsilon
|
||||||
lemmy-epsilon:
|
lemmy-epsilon:
|
||||||
image: lemmy-federation:latest
|
image: lemmy-federation:latest
|
||||||
environment:
|
environment:
|
||||||
- LEMMY_HOSTNAME=lemmy-epsilon:8580
|
- LEMMY_HOSTNAME=lemmy-epsilon:8581
|
||||||
- LEMMY_DATABASE_URL=postgres://lemmy:password@postgres_epsilon:5432/lemmy
|
- LEMMY_DATABASE_URL=postgres://lemmy:password@postgres_epsilon:5432/lemmy
|
||||||
- LEMMY_JWT_SECRET=changeme
|
- LEMMY_JWT_SECRET=changeme
|
||||||
- LEMMY_FRONT_END_DIR=/app/dist
|
|
||||||
- LEMMY_FEDERATION__ENABLED=true
|
- LEMMY_FEDERATION__ENABLED=true
|
||||||
- LEMMY_FEDERATION__TLS_ENABLED=false
|
- LEMMY_FEDERATION__TLS_ENABLED=false
|
||||||
- LEMMY_FEDERATION__BLOCKED_INSTANCES=lemmy-alpha
|
- LEMMY_FEDERATION__BLOCKED_INSTANCES=lemmy-alpha
|
||||||
- LEMMY_PORT=8580
|
- LEMMY_PORT=8581
|
||||||
- LEMMY_SETUP__ADMIN_USERNAME=lemmy_epsilon
|
- LEMMY_SETUP__ADMIN_USERNAME=lemmy_epsilon
|
||||||
- LEMMY_SETUP__ADMIN_PASSWORD=lemmy
|
- LEMMY_SETUP__ADMIN_PASSWORD=lemmy
|
||||||
- LEMMY_SETUP__SITE_NAME=lemmy-epsilon
|
- LEMMY_SETUP__SITE_NAME=lemmy-epsilon
|
||||||
|
|
40
docker/federation/nginx.conf
vendored
40
docker/federation/nginx.conf
vendored
|
@ -12,20 +12,20 @@ http {
|
||||||
client_max_body_size 50M;
|
client_max_body_size 50M;
|
||||||
|
|
||||||
location / {
|
location / {
|
||||||
proxy_pass http://lemmy-alpha:8540;
|
proxy_pass http://lemmy-alpha-ui:1234/;
|
||||||
proxy_set_header X-Real-IP $remote_addr;
|
proxy_set_header X-Real-IP $remote_addr;
|
||||||
proxy_set_header Host $host;
|
proxy_set_header Host $host;
|
||||||
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
|
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
|
||||||
|
|
||||||
# Cuts off the trailing slash on URLs to make them valid
|
# Cuts off the trailing slash on URLs to make them valid
|
||||||
rewrite ^(.+)/+$ $1 permanent;
|
rewrite ^(.+)/+$ $1 permanent;
|
||||||
|
}
|
||||||
# WebSocket support
|
location /api/v1/ws {
|
||||||
|
proxy_pass http://lemmy-alpha:8541;
|
||||||
proxy_http_version 1.1;
|
proxy_http_version 1.1;
|
||||||
proxy_set_header Upgrade $http_upgrade;
|
proxy_set_header Upgrade $http_upgrade;
|
||||||
proxy_set_header Connection "upgrade";
|
proxy_set_header Connection "upgrade";
|
||||||
}
|
}
|
||||||
|
|
||||||
location /iframely/ {
|
location /iframely/ {
|
||||||
proxy_pass http://iframely:80/;
|
proxy_pass http://iframely:80/;
|
||||||
proxy_set_header X-Real-IP $remote_addr;
|
proxy_set_header X-Real-IP $remote_addr;
|
||||||
|
@ -43,20 +43,20 @@ http {
|
||||||
client_max_body_size 50M;
|
client_max_body_size 50M;
|
||||||
|
|
||||||
location / {
|
location / {
|
||||||
proxy_pass http://lemmy-beta:8550;
|
proxy_pass http://lemmy-beta-ui:1234;
|
||||||
proxy_set_header X-Real-IP $remote_addr;
|
proxy_set_header X-Real-IP $remote_addr;
|
||||||
proxy_set_header Host $host;
|
proxy_set_header Host $host;
|
||||||
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
|
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
|
||||||
|
|
||||||
# Cuts off the trailing slash on URLs to make them valid
|
# Cuts off the trailing slash on URLs to make them valid
|
||||||
rewrite ^(.+)/+$ $1 permanent;
|
rewrite ^(.+)/+$ $1 permanent;
|
||||||
|
}
|
||||||
# WebSocket support
|
location /api/v1/ws {
|
||||||
|
proxy_pass http://lemmy-beta:8551;
|
||||||
proxy_http_version 1.1;
|
proxy_http_version 1.1;
|
||||||
proxy_set_header Upgrade $http_upgrade;
|
proxy_set_header Upgrade $http_upgrade;
|
||||||
proxy_set_header Connection "upgrade";
|
proxy_set_header Connection "upgrade";
|
||||||
}
|
}
|
||||||
|
|
||||||
location /iframely/ {
|
location /iframely/ {
|
||||||
proxy_pass http://iframely:80/;
|
proxy_pass http://iframely:80/;
|
||||||
proxy_set_header X-Real-IP $remote_addr;
|
proxy_set_header X-Real-IP $remote_addr;
|
||||||
|
@ -74,20 +74,20 @@ http {
|
||||||
client_max_body_size 50M;
|
client_max_body_size 50M;
|
||||||
|
|
||||||
location / {
|
location / {
|
||||||
proxy_pass http://lemmy-gamma:8560;
|
proxy_pass http://lemmy-gamma-ui:1234;
|
||||||
proxy_set_header X-Real-IP $remote_addr;
|
proxy_set_header X-Real-IP $remote_addr;
|
||||||
proxy_set_header Host $host;
|
proxy_set_header Host $host;
|
||||||
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
|
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
|
||||||
|
|
||||||
# Cuts off the trailing slash on URLs to make them valid
|
# Cuts off the trailing slash on URLs to make them valid
|
||||||
rewrite ^(.+)/+$ $1 permanent;
|
rewrite ^(.+)/+$ $1 permanent;
|
||||||
|
}
|
||||||
# WebSocket support
|
location /api/v1/ws {
|
||||||
|
proxy_pass http://lemmy-gamma:8561;
|
||||||
proxy_http_version 1.1;
|
proxy_http_version 1.1;
|
||||||
proxy_set_header Upgrade $http_upgrade;
|
proxy_set_header Upgrade $http_upgrade;
|
||||||
proxy_set_header Connection "upgrade";
|
proxy_set_header Connection "upgrade";
|
||||||
}
|
}
|
||||||
|
|
||||||
location /iframely/ {
|
location /iframely/ {
|
||||||
proxy_pass http://iframely:80/;
|
proxy_pass http://iframely:80/;
|
||||||
proxy_set_header X-Real-IP $remote_addr;
|
proxy_set_header X-Real-IP $remote_addr;
|
||||||
|
@ -105,20 +105,20 @@ http {
|
||||||
client_max_body_size 50M;
|
client_max_body_size 50M;
|
||||||
|
|
||||||
location / {
|
location / {
|
||||||
proxy_pass http://lemmy-delta:8570;
|
proxy_pass http://lemmy-delta-ui:1234;
|
||||||
proxy_set_header X-Real-IP $remote_addr;
|
proxy_set_header X-Real-IP $remote_addr;
|
||||||
proxy_set_header Host $host;
|
proxy_set_header Host $host;
|
||||||
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
|
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
|
||||||
|
|
||||||
# Cuts off the trailing slash on URLs to make them valid
|
# Cuts off the trailing slash on URLs to make them valid
|
||||||
rewrite ^(.+)/+$ $1 permanent;
|
rewrite ^(.+)/+$ $1 permanent;
|
||||||
|
}
|
||||||
# WebSocket support
|
location /api/v1/ws {
|
||||||
|
proxy_pass http://lemmy-delta:8571;
|
||||||
proxy_http_version 1.1;
|
proxy_http_version 1.1;
|
||||||
proxy_set_header Upgrade $http_upgrade;
|
proxy_set_header Upgrade $http_upgrade;
|
||||||
proxy_set_header Connection "upgrade";
|
proxy_set_header Connection "upgrade";
|
||||||
}
|
}
|
||||||
|
|
||||||
location /iframely/ {
|
location /iframely/ {
|
||||||
proxy_pass http://iframely:80/;
|
proxy_pass http://iframely:80/;
|
||||||
proxy_set_header X-Real-IP $remote_addr;
|
proxy_set_header X-Real-IP $remote_addr;
|
||||||
|
@ -136,20 +136,20 @@ http {
|
||||||
client_max_body_size 50M;
|
client_max_body_size 50M;
|
||||||
|
|
||||||
location / {
|
location / {
|
||||||
proxy_pass http://lemmy-epsilon:8580;
|
proxy_pass http://lemmy-epsilon-ui:1234;
|
||||||
proxy_set_header X-Real-IP $remote_addr;
|
proxy_set_header X-Real-IP $remote_addr;
|
||||||
proxy_set_header Host $host;
|
proxy_set_header Host $host;
|
||||||
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
|
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
|
||||||
|
|
||||||
# Cuts off the trailing slash on URLs to make them valid
|
# Cuts off the trailing slash on URLs to make them valid
|
||||||
rewrite ^(.+)/+$ $1 permanent;
|
rewrite ^(.+)/+$ $1 permanent;
|
||||||
|
}
|
||||||
# WebSocket support
|
location /api/v1/ws {
|
||||||
|
proxy_pass http://lemmy-epsilon:8581;
|
||||||
proxy_http_version 1.1;
|
proxy_http_version 1.1;
|
||||||
proxy_set_header Upgrade $http_upgrade;
|
proxy_set_header Upgrade $http_upgrade;
|
||||||
proxy_set_header Connection "upgrade";
|
proxy_set_header Connection "upgrade";
|
||||||
}
|
}
|
||||||
|
|
||||||
location /iframely/ {
|
location /iframely/ {
|
||||||
proxy_pass http://iframely:80/;
|
proxy_pass http://iframely:80/;
|
||||||
proxy_set_header X-Real-IP $remote_addr;
|
proxy_set_header X-Real-IP $remote_addr;
|
||||||
|
|
Loading…
Reference in a new issue