Skip to content

Commit

Permalink
Share dockerize command between cadence-server and cadence-auto-setup (
Browse files Browse the repository at this point in the history
  • Loading branch information
barakalon authored and wxing1292 committed Aug 29, 2019
1 parent f8bf786 commit ec55c6e
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 2 deletions.
3 changes: 2 additions & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -61,14 +61,15 @@ 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

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
Expand Down
3 changes: 3 additions & 0 deletions docker/start-cadence.sh
Original file line number Diff line number Diff line change
@@ -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
2 changes: 1 addition & 1 deletion docker/start.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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

0 comments on commit ec55c6e

Please sign in to comment.