adding prosody
This commit is contained in:
44
social/prosody/docker-compose.yml
Normal file
44
social/prosody/docker-compose.yml
Normal file
@@ -0,0 +1,44 @@
|
||||
services:
|
||||
# One-time init: creates ./data and ./certs with the correct ownership
|
||||
# Also, prosody's official docker image do not have any latest tag, so using current latest tag 13.0
|
||||
prosody-init:
|
||||
image: prosodyim/prosody:13.0
|
||||
container_name: prosody-init
|
||||
restart: "no"
|
||||
entrypoint: /bin/sh
|
||||
command: -c "mkdir -p /var/lib/prosody /etc/prosody/certs && chown prosody:prosody /var/lib/prosody /etc/prosody/certs"
|
||||
volumes:
|
||||
- ./data:/var/lib/prosody
|
||||
- ./certs:/etc/prosody/certs
|
||||
|
||||
# One-time init: dumps certs from Traefik's acme.json and makes them readable
|
||||
certs-init:
|
||||
image: ldez/traefik-certs-dumper:latest
|
||||
container_name: prosody-certs-init
|
||||
restart: "no"
|
||||
entrypoint: /bin/sh
|
||||
command: -c "traefik-certs-dumper file --version v2 --source /traefik/acme.json --dest /output && chmod 644 /output/certs/*.crt /output/private/*.key"
|
||||
volumes:
|
||||
- ../../tools/wireguard/letsencrypt:/traefik:ro # Change this to cert path if not using same folder structure
|
||||
- ./certs:/output
|
||||
|
||||
prosody:
|
||||
image: prosodyim/prosody:13.0
|
||||
container_name: prosody
|
||||
restart: unless-stopped
|
||||
env_file: .env
|
||||
volumes:
|
||||
- ./prosody.cfg.lua:/etc/prosody/prosody.cfg.lua:ro
|
||||
- ./data:/var/lib/prosody
|
||||
- ./certs:/etc/prosody/certs
|
||||
networks:
|
||||
- traefik_portal
|
||||
depends_on:
|
||||
prosody-init:
|
||||
condition: service_completed_successfully
|
||||
certs-init:
|
||||
condition: service_completed_successfully
|
||||
|
||||
networks:
|
||||
traefik_portal:
|
||||
external: true
|
||||
Reference in New Issue
Block a user