syncthing: don't run in host network mode, specify uid/gid

This commit is contained in:
Primoz Cankar 2021-12-21 22:47:35 +01:00
parent 6f404fb27b
commit 73a42c66fa
No known key found for this signature in database
GPG key ID: 83AF41165975BB29
2 changed files with 11 additions and 1 deletions

View file

@ -12,6 +12,10 @@ syncthing_data_directory: "{{ samba_shares_root }}/syncthing"
syncthing_volumes:
- "{{ syncthing_data_directory }}:/var/syncthing/"
syncthing_user_id: "0"
syncthing_group_id: "0"
# network
syncthing_port: 8384
syncthing_hostname: syncthing

View file

@ -11,7 +11,13 @@
name: syncthing
image: syncthing/syncthing:latest
pull: true
network_mode: host
ports:
- "8384:8384"
- "22000:22000/tcp"
- "22000:22000/udp"
env:
PUID: "{{ syncthing_user_id }}"
PGID: "{{ syncthing_group_id }}"
volumes: "{{ syncthing_volumes }}"
restart_policy: unless-stopped
memory: "{{ syncthing_memory }}"