Files

30 lines
1.0 KiB
Django/Jinja

services:
ocis:
image: {{ ocis_image }}
restart: unless-stopped
command: server
env_file: .env
{% if ocis_routing_mode in ["host", "traefik_file"] %}
ports:
- "{{ nbops_traefik_file_bind_address if ocis_routing_mode == 'traefik_file' else '0.0.0.0' }}:{{ ocis_http_port }}:9200"
{% endif %}
{% if ocis_routing_mode == "traefik" %}
# internal HTTP service port: 9200; not published on the Docker host
labels:
- traefik.enable=true
- traefik.http.routers.ocis.rule=Host(`{{ ocis_domain }}`)
- traefik.http.routers.ocis.entrypoints={{ ocis_traefik_entrypoint }}
- traefik.http.routers.ocis.tls={{ ocis_traefik_tls | bool | ternary('true', 'false') }}
- traefik.http.services.ocis.loadbalancer.server.port=9200
networks:
- {{ ocis_traefik_network }}
{% endif %}
volumes:
- {{ ocis_config_dir }}:/etc/ocis
- {{ ocis_data_dir }}:/var/lib/ocis
{% if ocis_routing_mode == "traefik" %}
networks:
{{ ocis_traefik_network }}:
external: true
{% endif %}