community-catalog/templates/openhab/4/docker-compose.yml.tpl
Wouter Born 24571d0ec8
Add openHAB 2.2.0
* Replace 2.2.0-SNAPSHOT with the stable 2.2.0 release
* Updates the default template from 2.1.0 to 2.2.0
* Add new template for testing openHAB 2.3.0-SNAPSHOT

Signed-off-by: Wouter Born <eclipse@maindrain.net>
2017-12-19 01:00:42 +01:00

60 lines
1.5 KiB
Smarty

version: '2'
services:
openhab:
{{- if eq .Values.PCAP_SUPPORT_ENABLED "true"}}
cap_add:
- NET_ADMIN
- NET_RAW
command: "./start.sh"
{{- end}}
{{- if or (ne .Values.DEVICE_MAPPING_1 "") (ne .Values.DEVICE_MAPPING_2 "") }}
devices:
{{- end}}
{{- if ne .Values.DEVICE_MAPPING_1 ""}}
- "${DEVICE_MAPPING_1}"
{{- end}}
{{- if ne .Values.DEVICE_MAPPING_2 ""}}
- "${DEVICE_MAPPING_2}"
{{- end}}
environment:
{{- if ne .Values.EXTRA_JAVA_OPTS ""}}
EXTRA_JAVA_OPTS: "${EXTRA_JAVA_OPTS}"
{{- end}}
OPENHAB_HTTP_PORT: "${HTTP_PORT}"
OPENHAB_HTTPS_PORT: "${HTTPS_PORT}"
image: "openhab/openhab:2.3.0-snapshot-${IMAGE_ARCHITECTURE}-${IMAGE_DISTRIBUTION}"
labels:
io.rancher.container.pull_image: always
{{- if ne .Values.HOST_LABEL ""}}
io.rancher.scheduler.affinity:host_label: ${HOST_LABEL}
{{- end}}
{{- if ne .Values.NETWORK_MODE "managed"}}
network_mode: ${NETWORK_MODE}
{{- end}}
ports:
- ${HTTP_PORT}:${HTTP_PORT}
- ${HTTPS_PORT}:${HTTPS_PORT}
restart: unless-stopped
tty: true
volumes:
{{- if eq .Values.USE_HOST_TIME "true"}}
- "/etc/localtime:/etc/localtime:ro"
- "/etc/timezone:/etc/timezone:ro"
{{- end}}
- "addons:/openhab/addons"
- "conf:/openhab/conf"
- "userdata:/openhab/userdata"
volumes:
addons:
driver: ${VOLUME_DRIVER}
per_container: true
conf:
driver: ${VOLUME_DRIVER}
per_container: true
userdata:
driver: ${VOLUME_DRIVER}
per_container: true