30 lines
930 B
Django/Jinja
30 lines
930 B
Django/Jinja
services:
|
|
ocis:
|
|
image: {{ ocis_image }}
|
|
restart: unless-stopped
|
|
command: server
|
|
env_file: .env
|
|
{% if ocis_routing_mode == "host" %}
|
|
ports:
|
|
- "{{ 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 %}
|