From fecdbfd48c9bad70cb90dc7f39f9cac5d7caa0a2 Mon Sep 17 00:00:00 2001 From: Salt Date: Mon, 7 Jun 2021 02:52:11 -0500 Subject: [PATCH] Deploy Peertube --- playbooks/db.yml | 9 ++++++++- playbooks/web.yml | 45 +++++++++++++++++++++++++++++++++++++++++++-- 2 files changed, 51 insertions(+), 3 deletions(-) diff --git a/playbooks/db.yml b/playbooks/db.yml index 6f980d0..5e847a4 100755 --- a/playbooks/db.yml +++ b/playbooks/db.yml @@ -43,9 +43,16 @@ owner: nextcloud-desultd - name: pleroma_cowfee owner: pleroma-cowfee - - name: peertube_cowfee + - name: peertube owner: peertube-cowfee tags: [ db, psql ] + tasks: + - name: enable db extensions for peertube + postgresql_ext: name={{ item }} db=peertube + with_items: + - pg_trgm + - unaccent + tags: [ db, psql, ext ] - hosts: psql1.9iron.club roles: - role: backup diff --git a/playbooks/web.yml b/playbooks/web.yml index 48052f2..e43271d 100755 --- a/playbooks/web.yml +++ b/playbooks/web.yml @@ -163,6 +163,19 @@ proxy_pass http://pleroma:4000; } } + server { + listen 443 ssl; + server_name tube.cowfee.moe; + ssl_certificate /etc/letsencrypt/live/cowfee.moe/fullchain.pem; + ssl_certificate_key /etc/letsencrypt/live/cowfee.moe/privkey.pem; + ssl_trusted_certificate /etc/letsencrypt/live/cowfee.moe/chain.pem; + ssl_dhparam /etc/letsencrypt/dhparams/dhparam.pem; + location / { + proxy_set_header Host $host; + proxy_set_header X-Real-IP $remote_addr; + proxy_pass http://peertube:9000; + } + } tags: [ docker, ingress ] - name: docker deploy pleroma docker_container: @@ -177,13 +190,41 @@ networks: - name: web aliases: [ "pleroma" ] - ports: - - "4000:4000" volumes: - /data/pleroma/etc:/etc/pleroma - /data/pleroma/static:/var/lib/pleroma/static - /data/pleroma/uploads:/var/lib/pleroma/uploads tags: [ docker, pleroma ] + - name: docker deploy redis + docker_container: + name: redis + image: redis:6-alpine + networks: + - name: web + aliases: [ "redis" ] + tags: [ docker, redis ] + - name: docker deploy peertube + docker_container: + name: peertube + image: chocobozzz/peertube:production-buster + env: + POSTGRES_DB: peertube_cowfee + PEERTUBE_DB: peertube_cowfee + PEERTUBE_DB_USERNAME: peertube-cowfee + PEERTUBE_DB_PASSWORD: "{{ secret_peertube_db_pass }}" + PEERTUBE_DB_HOSTNAME: 192.168.164.156 + PEERTUBE_ADMIN_EMAIL: rehashedsalt@cock.li + PEERTUBE_WEBSERVER_HOSTNAME: tube.cowfee.moe + PEERTUBE_TRUST_PROXY: '["127.0.0.0/16", "192.168.0.0/16", "172.16.0.0/12", "10.0.0.0/8"]' + networks: + - name: web + aliases: [ "peertube" ] + ports: + - "1935:1935" + volumes: + - /data/peertube/data:/data + - /data/peertube/config:/config + tags: [ docker, peertube ] - name: docker deploy nginx proxy docker_container: name: ingress