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 3036393663396633380a366461613536616264613237626164373631353137643963663830393833
34326639343831346333333461663634333434633136646163326634653439623138 34326639343831346333333461663634333434633136646163326634653439623138
# For Peertube
secret_peertube_db_pass: !vault |
$ANSIBLE_VAULT;1.1;AES256
32376536666566663033373033663331366437363331666662623831636135363633333532346531
6465346433663238343234366430633631306534626439310a636163356636613536366461663266
66663637303064303036366263663361616231336461346534363131343634646133323538356633
3639643838656137310a613333363865393536343731666234623065616365373834383536616161
64653939393038393361313961366131633461653139646536653163383336336338
# For Pleroma # For Pleroma
secret_pleroma_9iron_db_pass: !vault | secret_pleroma_9iron_db_pass: !vault |
$ANSIBLE_VAULT;1.1;AES256 $ANSIBLE_VAULT;1.1;AES256

View File

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

View File

@ -136,28 +136,82 @@
- role: certbot - role: certbot
tags: [ web, certbot ] tags: [ web, certbot ]
- hosts: web2.desu.ltd - hosts: web2.desu.ltd
vars_files: tasks:
- vars/apache.yml - name: ensure docker network
- vars/desultd-pleroma.yml docker_network: name=web
- vars/desultd-pleroma-apache.yml tags: [ docker ]
- vars/desultd-pleroma-certbot.yml - 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: roles:
- role: backup - role: backup
vars: vars:
backup_s3backup_list_extra: backup_s3backup_list_extra:
- /opt/pleroma - /data
- /var/lib/matrix-synapse
- /var/lib/pleroma
tags: [ backup ] tags: [ backup ]
- role: motd - role: motd
vars: vars:
motd_watch_services_extra: motd_watch_services_extra:
- apache2 - docker
- pleroma
tags: [ motd ] tags: [ motd ]
- role: pleroma - role: docker
tags: [ web, pleroma ] tags: [ web, docker, skip-pull ]
- role: apache
tags: [ web, apache ]
- role: certbot
tags: [ web, certbot ]