-
Notifications
You must be signed in to change notification settings - Fork 276
/
docker-compose.yml
241 lines (231 loc) · 8.92 KB
/
docker-compose.yml
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
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
version: "3.8"
services:
kafka:
tty: true
image: "bitnami/kafka:3.6.0"
environment:
TERM: "xterm-256color"
KAFKA_CFG_NODE_ID: 0
KAFKA_CFG_PROCESS_ROLES: controller,broker
KAFKA_CFG_LISTENERS: PLAINTEXT://:9092,CONTROLLER://:9093
KAFKA_CFG_LISTENER_SECURITY_PROTOCOL_MAP: CONTROLLER:PLAINTEXT,PLAINTEXT:PLAINTEXT
KAFKA_CFG_CONTROLLER_QUORUM_VOTERS: 0@kafka:9093
KAFKA_CFG_CONTROLLER_LISTENER_NAMES: CONTROLLER
healthcheck:
test: ["CMD-SHELL", "kafka-topics.sh --bootstrap-server 127.0.0.1:9092 --list"]
interval: 5s
timeout: 10s
retries: 30
# volumes:
# - ./data/kafka:/bitnami/kafka
#
# redis:
# tty: true
# image: redis:6.2-alpine
# restart: "unless-stopped"
# command: "redis-server --save 20 1 --loglevel warning --requirepass ${REDIS_PASSWORD:-default}"
# # volumes:
# # - ./data/redis:/var/lib/redis
clickhouse:
tty: true
image: clickhouse/clickhouse-server:24.1
restart: "unless-stopped"
environment:
- CLICKHOUSE_DB=newjitsu_metrics
- CLICKHOUSE_USER=default
- CLICKHOUSE_DEFAULT_ACCESS_MANAGEMENT=1
- CLICKHOUSE_PASSWORD=${CLICKHOUSE_PASSWORD:-default}
logging:
options:
max-size: 10m
max-file: "3"
mongo:
image: mongo
restart: "unless-stopped"
environment:
MONGO_INITDB_ROOT_USERNAME: default
MONGO_INITDB_ROOT_PASSWORD: ${MONGO_PASSWORD:-default}
postgres:
tty: true
image: postgres:14
restart: "unless-stopped"
user: postgres
environment:
- POSTGRES_USER=postgres
- POSTGRES_PASSWORD=${POSTGRES_PASSWORD:-default}
logging:
options:
max-size: 10m
max-file: "3"
healthcheck:
test: ["CMD-SHELL", "pg_isready", "-d", "postgres"]
interval: 1s
timeout: 10s
retries: 10
ports:
- "${EXTERNAL_POSTGRES_PORT:-5432}:5432"
## permissions problem is not that trivial to solve https://forums.docker.com/t/data-directory-var-lib-postgresql-data-pgdata-has-wrong-ownership/17963/42
# volumes:
# - ./data/postgres:/var/lib/postgresql/data
console:
tty: true
image: jitsucom/console:${DOCKER_TAG:-latest}
restart: "unless-stopped"
platform: linux/amd64
environment:
ROTOR_URL: "http://rotor:3401"
ROTOR_AUTH_KEY: ${BULKER_TOKEN:-default}
BULKER_URL: "http://bulker:3042"
CONSOLE_RAW_AUTH_TOKENS: ${CONSOLE_TOKEN:-default}
BULKER_AUTH_KEY: ${BULKER_TOKEN:-default}
MIT_COMPLIANT: ${MIT_COMPLIANT:-false}
DATABASE_URL: "postgresql://postgres:${POSTGRES_PASSWORD:-default}@postgres:5432/postgres?schema=newjitsu"
SEED_USER_EMAIL: ${SEED_USER_EMAIL:-}
SEED_USER_PASSWORD: ${SEED_USER_PASSWORD:-}
ENABLE_CREDETIALS_LOGIN: ${ENABLE_CREDETIALS_LOGIN:-true}
GITHUB_CLIENT_ID: ${GITHUB_CLIENT_ID}
GITHUB_CLIENT_SECRET: ${GITHUB_CLIENT_SECRET}
SYNCS_ENABLED: ${SYNCS_ENABLED:-false}
SYNCCTL_URL: "http://syncctl:${EXTERNAL_SYNCS_PORT:-3043}"
SYNCCTL_AUTH_KEY: ${SYNCCTL_TOKEN:-default}
GOOGLE_SCHEDULER_KEY: ${GOOGLE_SCHEDULER_KEY}
JITSU_INGEST_PUBLIC_URL: "${JITSU_INGEST_PUBLIC_URL:-http://localhost:${JITSU_INGEST_PORT:-8080}/}"
JITSU_PUBLIC_URL: "${JITSU_PUBLIC_URL:-${NEXTAUTH_URL:-http://localhost:${JITSU_UI_PORT:-3000}/}}"
NEXTAUTH_URL: "${JITSU_PUBLIC_URL:-${NEXTAUTH_URL:-http://localhost:${JITSU_UI_PORT:-3000}/}}"
CLICKHOUSE_HOST: "clickhouse:8123"
CLICKHOUSE_PASSWORD: "${CLICKHOUSE_PASSWORD:-default}"
CLICKHOUSE_DATABASE: "newjitsu_metrics"
UPDATE_DB: "true"
healthcheck:
test: ["CMD", "curl", "-f", "http://console:3000/api/healthcheck"]
interval: 2s
timeout: 10s
retries: 30
extra_hosts:
- "syncctl:host-gateway"
depends_on:
clickhouse:
condition: service_started
postgres:
condition: service_healthy
ports:
- "${JITSU_UI_PORT:-3000}:3000"
sync-catalog-init:
tty: true
image: curlimages/curl
restart: "on-failure"
environment:
CONSOLE_TOKEN: ${CONSOLE_TOKEN:-default}
command: "curl --silent --output nul --show-error -H 'Authorization: Bearer service-admin-account:${CONSOLE_TOKEN:-default}' http://console:3000/api/admin/catalog-refresh?initial=true"
depends_on:
console:
condition: service_healthy
bulker:
tty: true
image: jitsucom/bulker:${DOCKER_TAG:-latest}
platform: linux/amd64
restart: "unless-stopped"
environment:
TERM: "xterm-256color"
BULKER_KAFKA_BOOTSTRAP_SERVERS: "kafka:9092"
BULKER_RAW_AUTH_TOKENS: ${BULKER_TOKEN:-default}
BULKER_CONFIG_SOURCE: "http://console:3000/api/admin/export/bulker-connections"
BULKER_CONFIG_SOURCE_HTTP_AUTH_TOKEN: "service-admin-account:${CONSOLE_TOKEN:-default}"
BULKER_CACHE_DIR: "/tmp/cache"
BULKER_INTERNAL_TASK_LOG: '{"id":"task_log","metricsKeyPrefix":"syncs","usesBulker":true,"type":"postgres","options":{"mode":"stream"},"credentials":{"host":"postgres","port":5432,"sslMode":"disable","database":"postgres","password":"${POSTGRES_PASSWORD:-default}","username":"postgres","defaultSchema":"newjitsu"}}'
BULKER_CLICKHOUSE_HOST: "clickhouse:9000"
BULKER_CLICKHOUSE_PASSWORD: "${CLICKHOUSE_PASSWORD:-default}"
BULKER_CLICKHOUSE_DATABASE: "newjitsu_metrics"
healthcheck:
test: ["CMD", "curl", "-f", "http://bulker:3042/health"]
interval: 2s
timeout: 10s
retries: 15
ports:
- "${EXTERNAL_BULKER_PORT:-3042}:3042"
depends_on:
console:
condition: service_healthy
kafka:
condition: service_healthy
rotor:
tty: true
image: jitsucom/rotor:${DOCKER_TAG:-latest}
platform: linux/amd64
restart: "unless-stopped"
environment:
ROTOR_RAW_AUTH_TOKENS: ${BULKER_TOKEN:-default}
BULKER_URL: "http://bulker:3042"
BULKER_AUTH_KEY: ${BULKER_TOKEN:-default}
KAFKA_BOOTSTRAP_SERVERS: "kafka:9092"
# REDIS_URL: "redis://default:${REDIS_PASSWORD:-default}@redis:6379"
REPOSITORY_BASE_URL: "http://console:3000/api/admin/export/"
REPOSITORY_AUTH_TOKEN: "service-admin-account:${CONSOLE_TOKEN:-default}"
REPOSITORY_CACHE_DIR: "/tmp/cache"
MONGODB_URL: "mongodb://default:${MONGO_PASSWORD:-default}@mongo/"
CLICKHOUSE_HOST: "clickhouse:8123"
CLICKHOUSE_PASSWORD: "${CLICKHOUSE_PASSWORD:-default}"
CLICKHOUSE_DATABASE: "newjitsu_metrics"
healthcheck:
test: ["CMD", "curl", "-f", "http://rotor:3401/health"]
interval: 5s
timeout: 10s
retries: 15
depends_on:
console:
condition: service_healthy
bulker:
condition: service_healthy
# ports:
# - "3401:3401"
ingest:
tty: true
image: jitsucom/ingest:${DOCKER_TAG:-latest}
platform: linux/amd64
restart: "unless-stopped"
environment:
TERM: "xterm-256color"
INGEST_PUBLIC_URL: "${JITSU_INGEST_PUBLIC_URL:-http://localhost:${JITSU_INGEST_PORT:-8080}/}"
INGEST_KAFKA_BOOTSTRAP_SERVERS: "kafka:9092"
INGEST_RAW_AUTH_TOKENS: ${BULKER_TOKEN:-default}
INGEST_REPOSITORY_URL: "http://console:3000/api/admin/export/streams-with-destinations"
INGEST_SCRIPT_ORIGIN: "http://console:3000/api/s/javascript-library"
INGEST_REPOSITORY_AUTH_TOKEN: "service-admin-account:${CONSOLE_TOKEN:-default}"
INGEST_CACHE_DIR: "/tmp/cache"
INGEST_ROTOR_URL: "http://rotor:3401"
INGEST_ROTOR_AUTH_KEY: ${BULKER_TOKEN:-default}
INGEST_CLICKHOUSE_HOST: "clickhouse:9000"
INGEST_CLICKHOUSE_PASSWORD: "${CLICKHOUSE_PASSWORD:-default}"
INGEST_CLICKHOUSE_DATABASE: "newjitsu_metrics"
healthcheck:
test: ["CMD", "curl", "-f", "http://ingest:3049/health"]
interval: 2s
timeout: 10s
retries: 15
depends_on:
console:
condition: service_healthy
rotor:
condition: service_started
ports:
- "${JITSU_INGEST_PORT:-8080}:3049"
syncctl:
tty: true
image: jitsucom/syncctl:${DOCKER_TAG:-latest}
platform: linux/amd64
restart: "on-failure"
environment:
TERM: "xterm-256color"
HTTP_PORT: ${EXTERNAL_SYNCS_PORT:-3043}
SYNCCTL_SYNCS_ENABLED: ${SYNCS_ENABLED:-false}
SYNCCTL_RAW_AUTH_TOKENS: ${SYNCCTL_TOKEN:-default}
SYNCCTL_DATABASE_URL: "postgresql://postgres:${POSTGRES_PASSWORD:-default}@127.0.0.1:${EXTERNAL_POSTGRES_PORT:-5432}/postgres?search_path=newjitsu"
SYNCCTL_SIDECAR_DATABASE_URL: "postgresql://postgres:${POSTGRES_PASSWORD:-default}@${EXTERNAL_POSTGRES_HOST}:${EXTERNAL_POSTGRES_PORT:-5432}/postgres?search_path=newjitsu"
SYNCCTL_BULKER_URL: "http://${EXTERNAL_BULKER_HOST}:${EXTERNAL_BULKER_PORT:-3042}"
SYNCCTL_BULKER_AUTH_TOKEN: ${BULKER_TOKEN:-default}
SYNCCTL_KUBERNETES_CLIENT_CONFIG: "${SYNCCTL_KUBERNETES_CLIENT_CONFIG:-local}"
SYNCCTL_KUBERNETES_CONTEXT: "${SYNCCTL_KUBERNETES_CONTEXT}"
network_mode: "host"
depends_on:
bulker:
condition: service_healthy