43 lines
957 B
Django/Jinja
43 lines
957 B
Django/Jinja
# {{ ansible_managed }}
|
|
|
|
networks:
|
|
radicale-net:
|
|
ipam:
|
|
config:
|
|
- subnet: '{{ radicale_subnet }}'
|
|
|
|
services:
|
|
radicale:
|
|
build:
|
|
context: .
|
|
dockerfile: Dockerfile
|
|
args:
|
|
RADICALE_VERSION: {{ radicale_version }}
|
|
PYTHON_VERSION: {{ radicale_python_version }}
|
|
restart: always
|
|
networks:
|
|
radicale-net:
|
|
ipv4_address: {{ radicale_app_ip }}
|
|
healthcheck:
|
|
test: curl \
|
|
--fail \
|
|
--insecure \
|
|
--max-time 2 \
|
|
http://radicale:{{ radicale_app_port }}
|
|
start_period: 10s
|
|
interval: 1m
|
|
timeout: 10s
|
|
retries: 3
|
|
volumes:
|
|
- '{{ radicale_collection_dir }}:/app/collections'
|
|
|
|
nginx:
|
|
image: nginx:mainline-alpine
|
|
depends_on:
|
|
- radicale
|
|
restart: always
|
|
networks:
|
|
radicale-net:
|
|
ipv4_address: {{ radicale_nginx_ip }}
|
|
volumes:
|
|
- '{{ radicale_app_dir }}/nginx.conf.d:/etc/nginx/conf.d'
|