2020-06-08 13:37:14 -07:00
|
|
|
# This "container" is a workaround to pre-create search indices
|
2021-02-24 16:00:16 -08:00
|
|
|
|
|
|
|
# Defining environment
|
|
|
|
ARG APP_ENV=prod
|
|
|
|
|
|
|
|
FROM jwilder/dockerize:0.6.1 AS base
|
2019-09-12 19:04:29 -07:00
|
|
|
|
2020-12-02 20:49:34 -08:00
|
|
|
RUN apk add --no-cache curl jq
|
2019-09-12 19:04:29 -07:00
|
|
|
|
2021-02-24 16:00:16 -08:00
|
|
|
FROM base AS prod-install
|
|
|
|
|
2020-12-02 20:49:34 -08:00
|
|
|
COPY docker/elasticsearch-setup/create-indices.sh /
|
|
|
|
RUN chmod 755 create-indices.sh
|
2021-02-24 16:00:16 -08:00
|
|
|
COPY gms/impl/src/main/resources/index /index
|
|
|
|
|
|
|
|
FROM base AS dev-install
|
|
|
|
# Dummy stage for development. Use local files for setup
|
|
|
|
# See this excellent thread https://github.com/docker/cli/issues/1134
|
2019-09-12 19:04:29 -07:00
|
|
|
|
2021-02-24 16:00:16 -08:00
|
|
|
FROM ${APP_ENV}-install AS final
|
2020-12-02 20:49:34 -08:00
|
|
|
CMD dockerize -wait http://$ELASTICSEARCH_HOST:$ELASTICSEARCH_PORT -timeout 120s /create-indices.sh
|