summaryrefslogtreecommitdiffstats
path: root/stack.yml
blob: 53c4f422733685fb0f7547229cc01dc22db0a787 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
version: "2.1"

services:
  syncthing:
    image: ghcr.io/linuxserver/syncthing
    container_name: syncthing
    environment:
      - PUID=1000
      - PGID=1000
      - TZ=America/Chicago
    volumes:
      - syncthing:/config
      - ${HOME}/Sync:/config/Sync
      - ${HOME}/docker:/config/docker
      - ${HOME}/dotfiles:/config/dotfiles
    ports:
      - 8384:8384
      - 22000:22000
      - 21027:21027/udp
    restart: unless-stopped
    deploy:
      mode: replicated
      replicas: 1
      restart_policy:
        condition: on-failure
        delay: 5s
        max_attempts: 3
      labels:
        - traefik.enable=true
        - "traefik.http.routers.syncthing.rule=(Host(`sync.${DOMAIN}`) && Path(`/{{.Node.Hostname}}`))"
        - traefik.http.routers.syncthing.entrypoints=websecure
        - traefik.http.services.syncthing.loadbalancer.server.port=8384
        - traefik.http.routers.syncthing.middlewares=secured@docker

volumes:
  syncthing:

networks:
  default:
    external:
      name: proxy