Refactor radicale setup
This commit is contained in:
parent
a5e6468cb4
commit
634bd0433f
19 changed files with 214 additions and 564 deletions
43
templates/radicale/docker-compose.j2
Normal file
43
templates/radicale/docker-compose.j2
Normal file
|
|
@ -0,0 +1,43 @@
|
|||
# {{ 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'
|
||||
Loading…
Add table
Add a link
Reference in a new issue