summaryrefslogtreecommitdiffstats
path: root/ansible
diff options
context:
space:
mode:
authorDessalines <tyhou13@gmx.com>2020-02-17 11:18:01 -0500
committerDessalines <tyhou13@gmx.com>2020-02-17 11:18:01 -0500
commit55f91ac5dc1816463fb99d6974f89acd46de3444 (patch)
tree8c06996dfefb3dba27856c4efa36b669530c09d2 /ansible
parentb6ce26023efc75ca2b871d12c4f1c2c7b9696083 (diff)
First pass at adding oembeds / iframely.
Diffstat (limited to 'ansible')
-rw-r--r--ansible/lemmy.yml1
-rw-r--r--ansible/lemmy_dev.yml1
-rw-r--r--ansible/templates/docker-compose.yml9
-rw-r--r--ansible/templates/nginx.conf7
4 files changed, 18 insertions, 0 deletions
diff --git a/ansible/lemmy.yml b/ansible/lemmy.yml
index c415abef..8d5e2264 100644
--- a/ansible/lemmy.yml
+++ b/ansible/lemmy.yml
@@ -35,6 +35,7 @@
with_items:
- { src: 'templates/docker-compose.yml', dest: '/lemmy/docker-compose.yml', mode: '0600' }
- { src: 'templates/nginx.conf', dest: '/etc/nginx/sites-enabled/lemmy.conf', mode: '0644' }
+ - { src: '../docker/iframely.config.local.js', dest: '/lemmy/iframely.config.local.js', mode: '0600' }
- name: add config file (only during initial setup)
template: src='templates/config.hjson' dest='/lemmy/lemmy.hjson' mode='0600' force='no' owner='1000' group='1000'
diff --git a/ansible/lemmy_dev.yml b/ansible/lemmy_dev.yml
index c150714c..e9b8364f 100644
--- a/ansible/lemmy_dev.yml
+++ b/ansible/lemmy_dev.yml
@@ -37,6 +37,7 @@
with_items:
- { src: 'templates/docker-compose.yml', dest: '/lemmy/docker-compose.yml', mode: '0600' }
- { src: 'templates/nginx.conf', dest: '/etc/nginx/sites-enabled/lemmy.conf', mode: '0644' }
+ - { src: '../docker/iframely.config.local.js', dest: '/lemmy/iframely.config.local.js', mode: '0600' }
- name: add config file (only during initial setup)
template: src='templates/config.hjson' dest='/lemmy/lemmy.hjson' mode='0600' force='no' owner='1000' group='1000'
diff --git a/ansible/templates/docker-compose.yml b/ansible/templates/docker-compose.yml
index 2693d7ad..bf9aeeb5 100644
--- a/ansible/templates/docker-compose.yml
+++ b/ansible/templates/docker-compose.yml
@@ -30,6 +30,14 @@ services:
- lemmy_pictshare:/usr/share/nginx/html/data
restart: always
+ lemmy_iframely:
+ image: dogbin/iframely:latest
+ ports:
+ - "127.0.0.1:8061:8061"
+ volumes:
+ - ./iframely.config.local.js:/iframely/config.local.js:ro
+ restart: always
+
postfix:
image: mwader/postfix-relay
environment:
@@ -38,3 +46,4 @@ services:
volumes:
lemmy_db:
lemmy_pictshare:
+ lemmy_iframely:
diff --git a/ansible/templates/nginx.conf b/ansible/templates/nginx.conf
index 9f31140b..04e5a643 100644
--- a/ansible/templates/nginx.conf
+++ b/ansible/templates/nginx.conf
@@ -80,6 +80,13 @@ server {
add_header Cache-Control "public, max-age=31536000, immutable";
}
}
+
+ location /iframely/ {
+ proxy_pass http://0.0.0.0:8061/;
+ proxy_set_header X-Real-IP $remote_addr;
+ proxy_set_header Host $host;
+ proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
+ }
}
# Anonymize IP addresses