44 lines
1,014 B
Django/Jinja
44 lines
1,014 B
Django/Jinja
# {{ 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'
|