Update syncthing setup
This commit is contained in:
parent
dcbdfdc422
commit
734b1a3321
9 changed files with 363 additions and 195 deletions
44
templates/syncthing/docker-compose.j2
Normal file
44
templates/syncthing/docker-compose.j2
Normal file
|
|
@ -0,0 +1,44 @@
|
|||
# {{ ansible_managed }}
|
||||
|
||||
networks:
|
||||
syncthing-net:
|
||||
ipam:
|
||||
config:
|
||||
- subnet: '{{ syncthing_subnet }}'
|
||||
|
||||
services:
|
||||
syncthing:
|
||||
image: syncthing/syncthing
|
||||
container_name: syncthing
|
||||
environment:
|
||||
- PUID=1000
|
||||
- PGID=1000
|
||||
volumes:
|
||||
{% for folder in syncthing_folders -%}
|
||||
- {{ folder.source_path }}:{{ folder.path }}
|
||||
{% endfor -%}
|
||||
- {{ syncthing_app_dir }}/state:/var/syncthing/config
|
||||
restart: always
|
||||
networks:
|
||||
syncthing-net:
|
||||
ipv4_address: '{{ syncthing_app_ip }}'
|
||||
healthcheck:
|
||||
test: curl \
|
||||
--fail \
|
||||
--insecure \
|
||||
--max-time 2 \
|
||||
http://syncthing:8384/rest/noauth/health
|
||||
interval: 1m
|
||||
timeout: 10s
|
||||
retries: 3
|
||||
|
||||
nginx:
|
||||
image: nginx:mainline-alpine
|
||||
depends_on:
|
||||
- syncthing
|
||||
restart: always
|
||||
networks:
|
||||
syncthing-net:
|
||||
ipv4_address: '{{ syncthing_nginx_ip }}'
|
||||
volumes:
|
||||
- '{{ syncthing_app_dir }}/nginx.conf.d:/etc/nginx/conf.d'
|
||||
Loading…
Add table
Add a link
Reference in a new issue