Files
ansible-matzman-test/roles/docker-comic-utils/templates/docker-compose.j2
T
2026-03-24 08:19:29 +01:00

61 lines
2.1 KiB
Django/Jinja

services:
{{ app_name }}:
image: {{ comicutils_image_name }}
container_name: {{ app_name }}
logging:
options:
max-size: 20m # Reduce log size to 20MB
max-file: "3" # Keep only 3 rotated files
restart: unless-stopped
{% if app_proxy_network is none %}
ports:
- 5577:5577
{% endif %}
networks:
{% if app_proxy_network is not none %}
{{ app_proxy_network }}:
{% else %}
{{ app_name ~ "-net" }}:
{% endif %}
volumes:
- {{ docker_socket_path }}:/tmp/docker.sock:ro
- ./{{ comicutils_config_dir }}:/config
- ./{{ comicutils_cache_dir }}:/cache
## Additional folder is you want to use Folder Monitoring.
- ./{{ comicutils_downloads_dir }}:/downloads
- ./{{ comicutils_data_dir }}:/data
{% for m in comicutils_data_extramounts %}
{{ "- " ~ comicutils_data_extramounts[m] ~ ":/data/" ~ m}}
{% endfor %}
environment:
- FLASK_ENV=development
## Set to 'yes' if you want to use folder monitoring.
- MONITOR=no
## Set the User ID (PUID) and Group ID (PGID) for the container.
## This is often needed to resolve permission issues, especially on systems like Unraid
## where a specific user/group owns the files.
## For Unraid, PUID is typically 99 (user 'nobody') and PGID is typically 100 (group 'users').
## For Windows/WSL, you need to set these to match your Windows user ID (see WINDOWS_WSL_SETUP.md)
- PUID=1000
- PGID=1000
## Set the file creation mask (UMASK). 022 is a common value.
# - UMASK=022
{% if app_proxy_network is not none %}
labels:
traefik.enable: true
traefik.docker.network: "{{ app_proxy_network }}"
traefik.http.routers.{{ app_name }}-http.rule: "Host(`{{ app_base_domain }}`){%- for d in app_extra_domains %}{{ "||Host(`" ~ d ~ "`)" }}{% endfor %}"
traefik.http.routers.{{ app_name }}-http.entryPoints: web
traefik.http.services.{{ app_name }}.loadbalancer.server.port: 5577
{% endif %}
networks:
{% if app_proxy_network is not none %}
{{ app_proxy_network }}:
external: true
{% else %}
{{ app_name ~ "-net" }}:
{% endif %}