This repository has been archived on 2023-12-26. You can view files and clone it, but cannot push or open issues or pull requests.
shoarma/ansible/roles/syncthing/docker-stack.yml.j2

52 lines
1.3 KiB
Django/Jinja

# vi: ft=yaml
version: "3"
networks:
traefik:
external: true
configs:
config:
file: /srv/syncthing/config.xml
private_key:
file: /srv/syncthing/key.pem
certificate:
file: /srv/syncthing/cert.pem
services:
syncthing:
image: lscr.io/linuxserver/syncthing:latest
networks:
- traefik
deploy:
placement:
constraints:
- "node.labels.syncthing == true"
labels:
- traefik.enable=true
- traefik.http.routers.syncthing.entrypoints=localsecure
- traefik.http.routers.syncthing.rule=Host(`syncthing.pim.kunis.nl`)
- traefik.http.routers.syncthing.service=syncthing
- traefik.http.routers.syncthing.tls=true
- traefik.http.routers.syncthing.tls.certresolver=letsencrypt
- traefik.docker.network=traefik
- traefik.http.services.syncthing.loadbalancer.server.port=8384
environment:
- PUID=1000
- PGID=1000
- TZ=Europe/Amsterdam
volumes:
- type: bind
source: /mnt/data/syncthing
target: /data
configs:
- source: config
target: /config/config.xml
- source: private_key
target: /config/key.pem
uid: '1000'
gid: '1000'
- source: certificate
target: /config/cert.pem
uid: '1000'
gid: '1000'