diff options
Diffstat (limited to 'kolla/docker/watcher/watcher-api')
| -rw-r--r-- | kolla/docker/watcher/watcher-api/Dockerfile.j2 | 18 | ||||
| -rw-r--r-- | kolla/docker/watcher/watcher-api/extend_start.sh | 8 |
2 files changed, 26 insertions, 0 deletions
diff --git a/kolla/docker/watcher/watcher-api/Dockerfile.j2 b/kolla/docker/watcher/watcher-api/Dockerfile.j2 new file mode 100644 index 000000000..f31b53ecf --- /dev/null +++ b/kolla/docker/watcher/watcher-api/Dockerfile.j2 @@ -0,0 +1,18 @@ +FROM {{ namespace }}/{{ image_prefix }}watcher-base:{{ tag }} +{% block labels %} +LABEL maintainer="{{ maintainer }}" name="{{ image_name }}" +{% endblock %} + +{% block watcher_api_header %}{% endblock %} + +{% import "macros.j2" as macros with context %} + +COPY extend_start.sh /usr/local/bin/kolla_watcher_extend_start +RUN chmod 644 /usr/local/bin/kolla_watcher_extend_start + +{{ macros.kolla_patch_sources() }} + +{% block watcher_api_footer %}{% endblock %} +{% block footer %}{% endblock %} + +USER watcher diff --git a/kolla/docker/watcher/watcher-api/extend_start.sh b/kolla/docker/watcher/watcher-api/extend_start.sh new file mode 100644 index 000000000..629ea6355 --- /dev/null +++ b/kolla/docker/watcher/watcher-api/extend_start.sh @@ -0,0 +1,8 @@ +#!/bin/bash + +# Bootstrap and exit if KOLLA_BOOTSTRAP variable is set. This catches all cases +# of the KOLLA_BOOTSTRAP variable being set, including empty. +if [[ "${!KOLLA_BOOTSTRAP[@]}" ]]; then + watcher-db-manage --config-file /etc/watcher/watcher.conf upgrade + exit 0 +fi |
