diff options
Diffstat (limited to 'docker/watcher/watcher-api')
| -rw-r--r-- | docker/watcher/watcher-api/Dockerfile.j2 | 16 | ||||
| -rw-r--r-- | docker/watcher/watcher-api/extend_start.sh | 8 |
2 files changed, 24 insertions, 0 deletions
diff --git a/docker/watcher/watcher-api/Dockerfile.j2 b/docker/watcher/watcher-api/Dockerfile.j2 new file mode 100644 index 000000000..fadf5ea03 --- /dev/null +++ b/docker/watcher/watcher-api/Dockerfile.j2 @@ -0,0 +1,16 @@ +FROM {{ namespace }}/{{ image_prefix }}watcher-base:{{ tag }} +MAINTAINER {{ maintainer }} + +{% if install_type == 'binary' %} + +RUN echo '{{ install_type }} not yet available for {{ base_distro }}' \ + && /bin/false + +{% endif %} + +COPY extend_start.sh /usr/local/bin/kolla_watcher_extend_start +RUN chmod 755 /usr/local/bin/kolla_watcher_extend_start + +{{ include_footer }} + +USER watcher diff --git a/docker/watcher/watcher-api/extend_start.sh b/docker/watcher/watcher-api/extend_start.sh new file mode 100644 index 000000000..d1ea401bb --- /dev/null +++ b/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 create_schema + exit 0 +fi |
