-
Notifications
You must be signed in to change notification settings - Fork 51
/
docker-compose-custom.yaml
176 lines (172 loc) · 6.54 KB
/
docker-compose-custom.yaml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
services:
# etcd
etcd:
image: gcr.io/etcd-development/etcd:${COMPOSE_ETCD_VERSION_TAG}
container_name: etcd
ports:
- target: 2379 # Port assinged to etcd in the container
published: ${COMPOSE_ETCD_LISTEN_CLIENT_PORT} # Port to be exposed to the host
protocol: tcp # Protocol of the port
- target: 2380 # Port assinged to etcd in the container
published: ${COMPOSE_ETCD_LISTEN_PEER_PORT} # Port to be exposed to the host
protocol: tcp # Protocol of the port
volumes:
- ${COMPOSE_ETCD_VOLUME_HOST_PATH}:${COMPOSE_ETCD_VOLUME_CONTAINTER_PATH}
entrypoint: /usr/local/bin/etcd
command:
- --name
- ${COMPOSE_ETCD_NAME_OF_THIS_MEMBER}
- --data-dir
- ${COMPOSE_ETCD_VOLUME_CONTAINTER_PATH}
- --listen-client-urls
- ${COMPOSE_ETCD_LISTEN_CLIENT_URLS}
- --advertise-client-urls
- ${COMPOSE_ETCD_ADVERTISE_CLIENT_URLS}
- --listen-peer-urls
- ${COMPOSE_ETCD_LISTEN_PEER_URLS}
- --initial-advertise-peer-urls
- ${COMPOSE_ETCD_INITIAL_ADVERTISE_PEER_URLS}
- --initial-cluster
- ${COMPOSE_ETCD_INITIAL_CLUSTER}
- --initial-cluster-token
- ${COMPOSE_ETCD_INITIAL_CLUSTER_TOKEN}
- --initial-cluster-state
- ${COMPOSE_ETCD_INITIAL_CLUSTER_STATE}
- --log-level
- ${COMPOSE_ETCD_LOG_LEVEL}
- --logger
- ${COMPOSE_ETCD_LOGGER}
- --log-outputs
- ${COMPOSE_ETCD_LOG_OUTPUTS}
- --auth-token
- ${COMPOSE_ETCD_AUTH_TOKEN}
healthcheck: # for etcd
test: [ "CMD", "/usr/local/bin/etcd", "--version"]
interval: 1m
timeout: 5s
retries: 3
start_period: 10s
# etcd-conf
etcd-conf:
image: alpine:latest
container_name: etcd-conf
depends_on:
- etcd
volumes:
- ./scripts/etcd/:/scripts/etcd/
# env_file:
# - ./scripts/etcd/.env
environment:
- ETCD_VERSION_TAG=${COMPOSE_ETCD_CONF_VERSION_TAG}
- ETCD_ENDPOINTS=${COMPOSE_ETCD_CONF_ENDPOINTS}
- ETCD_PATH=${COMPOSE_ETCD_CONF_ETCD_PATH}
- ETCD_AUTH_ENABLED=${COMPOSE_ETCD_CONF_AUTH_ENABLED}
- ETCD_ROOT_PASSWORD=${COMPOSE_ETCD_CONF_ROOT_PASSWORD}
- ETCD_ADMIN_USERNAME=${COMPOSE_ETCD_CONF_ADMIN_USERNAME}
- ETCD_ADMIN_PASSWORD=${COMPOSE_ETCD_CONF_ADMIN_PASSWORD}
command: sh -c "sh /scripts/etcd/etcd-conf.sh"
healthcheck: # for etcd-conf
test: ["CMD", "test", "-f", "/tmp/healthcheck"]
interval: 30s
timeout: 10s
retries: 3
start_period: 10s
# CB-Spider
cb-spider:
image: cloudbaristaorg/cb-spider:${COMPOSE_SP_VERSION_TAG}
container_name: cb-spider
platform: linux/amd64
ports:
- target: 1024
published: ${COMPOSE_SP_REST_PORT}
protocol: tcp
volumes:
# - ./conf/log_conf.yaml:/root/go/src/github.com/cloud-barista/cb-spider/conf/log_conf.yaml
# - ./conf/store_conf.yaml:/root/go/src/github.com/cloud-barista/cb-spider/conf/store_conf.yaml
- ${COMPOSE_SP_VOLUME_HOST_PATH}/meta_db/:${COMPOSE_SP_VOLUME_CONTAINTER_PATH}/meta_db/
- ${COMPOSE_SP_VOLUME_HOST_PATH}/log/:${COMPOSE_SP_VOLUME_CONTAINTER_PATH}/log/
environment:
- PLUGIN_SW=${COMPOSE_SP_PLUGSIN_SW}
- SERVER_ADDRESS=${COMPOSE_SP_SERVER_ADDRESS}
# if you leave these values empty, REST Auth will be disabled.
# - API_USERNAME=${COMPOSE_SP_API_USERNAME}
# - API_PASSWORD=${COMPOSE_SP_API_PASSWORD}
- SPIDER_LOG_LEVEL=${COMPOSE_SP_LOG_LEVEL}
- SPIDER_HISCALL_LOG_LEVEL=${COMPOSE_SP_HISCALL_LOG_LEVEL}
- ID_TRANSFORM_MODE=${COMPOSE_SP_ID_TRANSFORM_MODE}
healthcheck: # for CB-Spider
test: [ "CMD", "curl", "-f", "http://localhost:1024/spider/readyz" ]
interval: 1m
timeout: 5s
retries: 3
start_period: 10s
# CB-Tumblebug
cb-tumblebug:
image: cloudbaristaorg/cb-tumblebug:${COMPOSE_TB_VERSION_TAG}
pull_policy: missing
build:
context: .
dockerfile: Dockerfile
container_name: cb-tumblebug
platform: linux/amd64
ports:
- target: 1323
published: ${COMPOSE_TB_REST_PORT}
protocol: tcp
depends_on:
- cb-spider
- etcd-conf
volumes:
# - ./conf/:/app/conf/
- ${COMPOSE_TB_VOLUME_HOST_PATH}/meta_db/:${COMPOSE_TB_VOLUME_CONTAINTER_PATH}/meta_db/
- ${COMPOSE_TB_VOLUME_HOST_PATH}/log/:${COMPOSE_TB_VOLUME_CONTAINTER_PATH}/log/
environment:
- TB_ROOT_PATH=${COMPOSE_TB_ROOT_PATH}
- TB_SPIDER_REST_URL=${COMPOSE_TB_SPIDER_REST_URL}
- TB_DRAGONFLY_REST_URL=${COMPOSE_TB_DRAGONFLY_REST_URL}
- TB_SQLITE_URL=${COMPOSE_TB_SQLITE_URL}
- TB_SQLITE_DATABASE=${COMPOSE_TB_SQLITE_DATABASE}
- TB_SQLITE_USER=${COMPOSE_TB_SQLITE_USER}
- TB_SQLITE_PASSWORD=${COMPOSE_TB_SQLITE_PASSWORD}
- TB_ETCD_ENDPOINTS=${COMPOSE_TB_ETCD_ENDPOINTS}
- TB_ETCD_AUTH_ENABLED=${COMPOSE_TB_ETCD_AUTH_ENABLED}
- TB_ETCD_USERNAME=${COMPOSE_TB_ETCD_USERNAME}
- TB_ETCD_PASSWORD=${COMPOSE_TB_ETCD_PASSWORD}
- TB_ALLOW_ORIGINS=${COMPOSE_TB_ALLOW_ORIGINS}
- TB_AUTH_ENABLED=${COMPOSE_TB_AUTH_ENABLED}
- TB_API_USERNAME=${COMPOSE_TB_API_USERNAME}
- TB_API_PASSWORD=${COMPOSE_TB_API_PASSWORD}
- TB_AUTOCONTROL_DURATION_MS=${COMPOSE_TB_AUTOCONTROL_DURATION_MS}
- TB_SELF_ENDPOINT=${COMPOSE_TB_SELF_ENDPOINT}
- TB_DEFAULT_NAMESPACE=${COMPOSE_TB_DEFAULT_NAMESPACE}
- TB_DEFAULT_CREDENTIALHOLDER=${COMPOSE_TB_DEFAULT_CREDENTIALHOLDER}
- TB_LOGFILE_PATH=${COMPOSE_TB_LOGFILE_PATH}
- TB_LOGFILE_MAXSIZE=${COMPOSE_TB_LOGFILE_MAXSIZE}
- TB_LOGFILE_MAXBACKUPS=${COMPOSE_TB_LOGFILE_MAXBACKUPS}
- TB_LOGFILE_MAXAGE=${COMPOSE_TB_LOGFILE_MAXAGE}
- TB_LOGFILE_COMPRESS=${COMPOSE_TB_LOGFILE_COMPRESS}
- TB_LOGLEVEL=${COMPOSE_TB_LOGLEVEL}
- TB_LOGWRITER=${COMPOSE_TB_LOGWRITER}
- TB_NODE_ENV=${COMPOSE_TB_NODE_ENV}
healthcheck: # for CB-Tumblebug
test: [ "CMD", "curl", "-f", "http://localhost:1323/tumblebug/readyz" ]
interval: 1m
timeout: 5s
retries: 3
start_period: 10s
# cb-mapui
cb-mapui:
image: cloudbaristaorg/cb-mapui:${COMPOSE_MAP_VERSION_TAG}
container_name: cb-mapui
ports:
- target: 1324
published: ${COMPOSE_MAP_PORT}
protocol: tcp
# depends_on:
# - cb-tumblebug
healthcheck: # for cb-mapui
test: ["CMD", "nc", "-vz", "localhost", "1324"]
interval: 1m
timeout: 5s
retries: 3
start_period: 10s