summaryrefslogtreecommitdiffstats
path: root/docker/federation
diff options
context:
space:
mode:
authorDessalines <tyhou13@gmx.com>2020-06-23 21:11:38 -0400
committerDessalines <tyhou13@gmx.com>2020-06-23 21:11:38 -0400
commitdc94e58cbf7e7de10d97331a3056380a3416e0b0 (patch)
tree85ed25783b0470ead3012a9718aea50b39c940dd /docker/federation
parentfd6a040568239d2e6949394fdc0ce0f7ac70275c (diff)
parent790b944031f9433be765936763d848ffa6e1b496 (diff)
Merge branch 'master' into federation_merge_from_master_2
Diffstat (limited to 'docker/federation')
-rw-r--r--docker/federation/docker-compose.yml27
-rw-r--r--docker/federation/nginx.conf27
-rwxr-xr-xdocker/federation/run-federation-test.bash5
3 files changed, 41 insertions, 18 deletions
diff --git a/docker/federation/docker-compose.yml b/docker/federation/docker-compose.yml
index 4379eb38..585f2b4b 100644
--- a/docker/federation/docker-compose.yml
+++ b/docker/federation/docker-compose.yml
@@ -12,11 +12,11 @@ services:
- ../federation/nginx.conf:/etc/nginx/nginx.conf
depends_on:
- lemmy_alpha
- - pictshare_alpha
+ - pictrs_alpha
- lemmy_beta
- - pictshare_beta
+ - pictrs_beta
- lemmy_gamma
- - pictshare_gamma
+ - pictrs_gamma
- iframely
restart: "always"
@@ -48,10 +48,11 @@ services:
volumes:
- ./volumes/postgres_alpha:/var/lib/postgresql/data
restart: always
- pictshare_alpha:
- image: shtripok/pictshare:latest
+ pictrs_alpha:
+ image: asonix/pictrs:v0.1.13-r0
+ user: 991:991
volumes:
- - ./volumes/pictshare_alpha:/usr/share/nginx/html/data
+ - ./volumes/pictrs_alpha:/mnt
restart: always
lemmy_beta:
@@ -82,10 +83,11 @@ services:
volumes:
- ./volumes/postgres_beta:/var/lib/postgresql/data
restart: always
- pictshare_beta:
- image: shtripok/pictshare:latest
+ pictrs_beta:
+ image: asonix/pictrs:v0.1.13-r0
+ user: 991:991
volumes:
- - ./volumes/pictshare_beta:/usr/share/nginx/html/data
+ - ./volumes/pictrs_beta:/mnt
restart: always
lemmy_gamma:
@@ -116,10 +118,11 @@ services:
volumes:
- ./volumes/postgres_gamma:/var/lib/postgresql/data
restart: always
- pictshare_gamma:
- image: shtripok/pictshare:latest
+ pictrs_gamma:
+ image: asonix/pictrs:v0.1.13-r0
+ user: 991:991
volumes:
- - ./volumes/pictshare_gamma:/usr/share/nginx/html/data
+ - ./volumes/pictrs_gamma:/mnt
restart: always
iframely:
diff --git a/docker/federation/nginx.conf b/docker/federation/nginx.conf
index a73b0954..25160eb6 100644
--- a/docker/federation/nginx.conf
+++ b/docker/federation/nginx.conf
@@ -23,11 +23,16 @@ http {
proxy_set_header Connection "upgrade";
}
- location /pictshare/ {
- proxy_pass http://pictshare_alpha:80/;
+ # pict-rs images
+ location /pictrs {
+ location /pictrs/image {
+ proxy_pass http://pictrs_alpha:8080/image;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header Host $host;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
+ }
+ # Block the import
+ return 403;
}
location /iframely/ {
@@ -58,11 +63,16 @@ http {
proxy_set_header Connection "upgrade";
}
- location /pictshare/ {
- proxy_pass http://pictshare_beta:80/;
+ # pict-rs images
+ location /pictrs {
+ location /pictrs/image {
+ proxy_pass http://pictrs_beta:8080/image;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header Host $host;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
+ }
+ # Block the import
+ return 403;
}
location /iframely/ {
@@ -93,11 +103,16 @@ http {
proxy_set_header Connection "upgrade";
}
- location /pictshare/ {
- proxy_pass http://pictshare_gamma:80/;
+ # pict-rs images
+ location /pictrs {
+ location /pictrs/image {
+ proxy_pass http://pictrs_gamma:8080/image;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header Host $host;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
+ }
+ # Block the import
+ return 403;
}
location /iframely/ {
diff --git a/docker/federation/run-federation-test.bash b/docker/federation/run-federation-test.bash
index 206a3240..bc73fff6 100755
--- a/docker/federation/run-federation-test.bash
+++ b/docker/federation/run-federation-test.bash
@@ -20,4 +20,9 @@ popd || exit
sudo docker build ../../ --file Dockerfile -t lemmy-federation:latest
+for Item in alpha beta gamma ; do
+ sudo mkdir -p volumes/pictrs_$Item
+ sudo chown -R 991:991 volumes/pictrs_$Item
+done
+
sudo docker-compose up