33version : ' 3.5'
44
55services :
6- # Extend cassandra service with healthcheck and network
7- cassandra :
8- networks :
9- - temporal-dev-network
10- healthcheck :
11- test : ["CMD", "cqlsh", "-e", "describe keyspaces"]
12- interval : 5s
13- timeout : 5s
14- retries : 60
15- start_period : 30s
16-
17- # Extend elasticsearch service with healthcheck and network
18- elasticsearch :
19- networks :
20- - temporal-dev-network
21- healthcheck :
22- test : ["CMD-SHELL", "curl -f http://localhost:9200/_cluster/health?wait_for_status=yellow&timeout=1s || exit 1"]
23- interval : 5s
24- timeout : 5s
25- retries : 60
26- start_period : 30s
27-
28- temporal-admin-tools :
29- image : temporaliotest/admin-tools:${IMAGE_TAG:-latest}
30- container_name : temporal-admin-tools
31- depends_on :
32- cassandra :
33- condition : service_healthy
34- elasticsearch :
35- condition : service_healthy
36- environment :
37- - CASSANDRA_SEEDS=cassandra
38- - ES_HOST=elasticsearch
39- - ES_PORT=9200
40- - ES_SCHEME=http
41- - ES_VERSION=v7
42- - ES_VISIBILITY_INDEX=temporal_visibility_v1_dev
43- networks :
44- - temporal-dev-network
45- entrypoint : ["/bin/sh", "-c"]
46- command : >
47- "echo 'Starting admin-tools setup...' &&
48- temporal-cassandra-tool --ep cassandra create -k temporal --rf 1 &&
49- temporal-cassandra-tool --ep cassandra -k temporal setup-schema -v 0.0 &&
50- temporal-cassandra-tool --ep cassandra -k temporal update-schema -d /etc/temporal/schema/cassandra/temporal/versioned &&
51- curl -X PUT --fail \"$$ES_SCHEME://$$ES_HOST:$$ES_PORT/_template/temporal_visibility_v1_template\" -H 'Content-Type: application/json' --data-binary \"@/etc/temporal/schema/elasticsearch/visibility/index_template_$$ES_VERSION.json\" &&
52- curl --head --fail \"$$ES_SCHEME://$$ES_HOST:$$ES_PORT/$$ES_VISIBILITY_INDEX\" || curl -X PUT --fail \"$$ES_SCHEME://$$ES_HOST:$$ES_PORT/$$ES_VISIBILITY_INDEX\" &&
53- echo 'Cassandra and Elasticsearch setup complete'"
54-
556 temporal-server :
56- image : temporaliotest/server:${IMAGE_TAG:-latest}
57- depends_on :
58- temporal-admin-tools :
59- condition : service_completed_successfully
7+ image : temporaliotest/auto-setup:${IMAGE_TAG:-latest}
608 environment :
619 - CASSANDRA_SEEDS=cassandra
6210 - ENABLE_ES=true
@@ -66,6 +14,9 @@ services:
6614 - ./dynamicconfig:/etc/temporal/config/dynamicconfig
6715 ports :
6816 - ' 7233:7233'
17+ depends_on :
18+ - cassandra
19+ - elasticsearch
6920 networks :
7021 - temporal-dev-network
7122
@@ -128,7 +79,3 @@ services:
12879 - temporal-server
12980 networks :
13081 - temporal-dev-network
131-
132- networks :
133- temporal-dev-network :
134- driver : bridge
0 commit comments