From ec55c6e1410637f45d1ffa4af4a9a395ebd9da19 Mon Sep 17 00:00:00 2001 From: barak Date: Thu, 29 Aug 2019 15:15:21 -0700 Subject: [PATCH] Share dockerize command between cadence-server and cadence-auto-setup (#2475) --- Dockerfile | 3 ++- docker/start-cadence.sh | 3 +++ docker/start.sh | 2 +- 3 files changed, 6 insertions(+), 2 deletions(-) create mode 100644 docker/start-cadence.sh diff --git a/Dockerfile b/Dockerfile index 4082a6334a7..12c523e92c2 100644 --- a/Dockerfile +++ b/Dockerfile @@ -61,6 +61,7 @@ COPY --from=builder /cadence/schema /etc/cadence/schema COPY docker/entrypoint.sh /docker-entrypoint.sh COPY config/dynamicconfig /etc/cadence/config/dynamicconfig COPY docker/config_template.yaml /etc/cadence/config +COPY docker/start-cadence.sh /start-cadence.sh WORKDIR /etc/cadence @@ -68,7 +69,7 @@ ENV SERVICES="history,matching,frontend,worker" EXPOSE 7933 7934 7935 7939 ENTRYPOINT ["/docker-entrypoint.sh"] -CMD dockerize -template /etc/cadence/config/config_template.yaml:/etc/cadence/config/docker.yaml cadence-server --root $CADENCE_HOME --env docker start --services=$SERVICES +CMD /start-cadence.sh # All-in-one Cadence server diff --git a/docker/start-cadence.sh b/docker/start-cadence.sh new file mode 100644 index 00000000000..9fc18d3f84d --- /dev/null +++ b/docker/start-cadence.sh @@ -0,0 +1,3 @@ +#!/bin/bash + +dockerize -template /etc/cadence/config/config_template.yaml:/etc/cadence/config/docker.yaml cadence-server --root $CADENCE_HOME --env docker start --services=$SERVICES diff --git a/docker/start.sh b/docker/start.sh index 81c8b14704f..129cdff212e 100755 --- a/docker/start.sh +++ b/docker/start.sh @@ -106,4 +106,4 @@ if [ "$SKIP_SCHEMA_SETUP" != true ]; then setup_schema fi -dockerize -template /etc/cadence/config/config_template.yaml:/etc/cadence/config/docker.yaml cadence-server --root $CADENCE_HOME --env docker start --services=$SERVICES +bash /start-cadence.sh