Compare commits

...

2 Commits

Author SHA1 Message Date
bb349c634f Migrate Pleroma into a Docker container
This greatly simplifies configuration on web2, oddly enough
2021-06-03 20:34:48 -05:00
07e666b978 Get ready for a Peertube install 2021-06-03 19:11:50 -05:00
3 changed files with 83 additions and 16 deletions

View File

@ -143,6 +143,15 @@ secret_onlyoffice_9iron_db_pass: !vault |
3036393663396633380a366461613536616264613237626164373631353137643963663830393833
34326639343831346333333461663634333434633136646163326634653439623138
# For Peertube
secret_peertube_db_pass: !vault |
$ANSIBLE_VAULT;1.1;AES256
32376536666566663033373033663331366437363331666662623831636135363633333532346531
6465346433663238343234366430633631306534626439310a636163356636613536366461663266
66663637303064303036366263663361616231336461346534363131343634646133323538356633
3639643838656137310a613333363865393536343731666234623065616365373834383536616161
64653939393038393361313961366131633461653139646536653163383336336338
# For Pleroma
secret_pleroma_9iron_db_pass: !vault |
$ANSIBLE_VAULT;1.1;AES256

View File

@ -30,6 +30,8 @@
password: "{{ secret_gulagbot_db_pass }}"
- name: nextcloud-desultd
password: "{{ secret_nextcloud_db_pass }}"
- name: peertube-cowfee
password: "{{ secret_peertube_db_pass }}"
- name: pleroma-cowfee
password: "{{ secret_pleroma_9iron_db_pass }}"
postgresql_databases:
@ -41,6 +43,8 @@
owner: nextcloud-desultd
- name: pleroma_cowfee
owner: pleroma-cowfee
- name: peertube_cowfee
owner: peertube-cowfee
tags: [ db, psql ]
- hosts: psql1.9iron.club
roles:

View File

@ -136,28 +136,82 @@
- role: certbot
tags: [ web, certbot ]
- hosts: web2.desu.ltd
vars_files:
- vars/apache.yml
- vars/desultd-pleroma.yml
- vars/desultd-pleroma-apache.yml
- vars/desultd-pleroma-certbot.yml
tasks:
- name: ensure docker network
docker_network: name=web
tags: [ docker ]
- name: ensure docker nginx config
copy:
dest: /data/nginx-certbot/user_conf.d/vhosts.conf
mode: "0750"
content: |
server {
listen 443 ssl default_server;
server_name 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://pleroma:4000;
}
}
tags: [ docker, ingress ]
- name: docker deploy nginx proxy
docker_container:
name: ingress
state: started
image: jonasal/nginx-certbot:2.2.0
restart_policy: unless-stopped
pull: yes
env:
TZ: "America/Chicago"
CERTBOT_EMAIL: rehashedsalt@cock.li
networks:
- name: web
aliases: [ "ingress" ]
ports:
- "443:443"
- "80:80"
volumes:
- /data/nginx-certbot/letsencrypt:/etc/letsencrypt
- /data/nginx-certbot/user_conf.d:/etc/nginx/user_conf.d:ro
tags: [ docker, ingress ]
- name: docker deploy pleroma
docker_container:
name: pleroma
state: started
image: jordemort/pleroma
restart_policy: unless-stopped
pull: yes
env:
TZ: "America/Chicago"
POSTGRES_HOST: 192.168.164.156
POSTGRES_DB: pleroma_cowfee
POSTGRES_USER: pleroma-cowfee
POSTGRES_PASSWORD: "{{ secret_pleroma_9iron_db_pass }}"
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 ]
roles:
- role: backup
vars:
backup_s3backup_list_extra:
- /opt/pleroma
- /var/lib/matrix-synapse
- /var/lib/pleroma
- /data
tags: [ backup ]
- role: motd
vars:
motd_watch_services_extra:
- apache2
- pleroma
- docker
tags: [ motd ]
- role: pleroma
tags: [ web, pleroma ]
- role: apache
tags: [ web, apache ]
- role: certbot
tags: [ web, certbot ]
- role: docker
tags: [ web, docker, skip-pull ]