fix(docker-compose): clickhouse migration
Signed-off-by: rjshrjndrn <rjshrjndrn@gmail.com>
This commit is contained in:
parent
85d6d0abac
commit
f9a3f24590
2 changed files with 5 additions and 5 deletions
|
|
@ -142,7 +142,7 @@ services:
|
|||
networks:
|
||||
- openreplay-net
|
||||
volumes:
|
||||
- ../schema/db/init_dbs/clickhouse/init_schema.sql:/tmp/init_schema.sql
|
||||
- ../schema/db/init_dbs/clickhouse/create/init_schema.sql:/tmp/init_schema.sql
|
||||
environment:
|
||||
CH_HOST: "clickhouse-openreplay-clickhouse.db.svc.cluster.local"
|
||||
CH_PORT: "9000"
|
||||
|
|
@ -161,7 +161,7 @@ services:
|
|||
done
|
||||
|
||||
echo "clickhouse is up - executing command"
|
||||
clickhouse-client -h clickhouse-openreplay-clickhouse.db.svc.cluster.local --user default --port 8123 --multiquery < /tmp/init_schema.sql || true
|
||||
clickhouse-client -h clickhouse-openreplay-clickhouse.db.svc.cluster.local --user default --port 9000 --multiquery < /tmp/init_schema.sql || true
|
||||
|
||||
alerts-openreplay:
|
||||
image: public.ecr.aws/p1t3u8a3/alerts:${COMMON_VERSION}
|
||||
|
|
|
|||
|
|
@ -142,7 +142,7 @@ services:
|
|||
networks:
|
||||
- openreplay-net
|
||||
volumes:
|
||||
- ../schema/db/init_dbs/clickhouse/init_schema.sql:/tmp/init_schema.sql
|
||||
- ../schema/db/init_dbs/clickhouse/create/init_schema.sql:/tmp/init_schema.sql
|
||||
environment:
|
||||
CH_HOST: "{{.Values.global.clickhouse.chHost}}"
|
||||
CH_PORT: "{{.Values.global.clickhouse.service.webPort}}"
|
||||
|
|
@ -155,13 +155,13 @@ services:
|
|||
- |
|
||||
# Checking variable is empty. Shell independant method.
|
||||
# Wait for Minio to be ready
|
||||
until nc -z -v -w30 clickhouse-openreplay-clickhouse.db.svc.cluster.local 9000; do
|
||||
until nc -z -v -w30 {{.Values.global.clickhouse.chHost}} {{.Values.global.clickhouse.service.webPort}}; do
|
||||
echo "Waiting for Minio server to be ready..."
|
||||
sleep 1
|
||||
done
|
||||
|
||||
echo "clickhouse is up - executing command"
|
||||
clickhouse-client -h {{.Values.global.clickhouse.chHost}} --user {{.Values.global.clickhouse.username}} --port {{.Values.global.clickhouse.service.dataPort}} --multiquery < /tmp/init_schema.sql || true
|
||||
clickhouse-client -h {{.Values.global.clickhouse.chHost}} --user {{.Values.global.clickhouse.username}} --port {{.Values.global.clickhouse.service.webPort}} --multiquery < /tmp/init_schema.sql || true
|
||||
|
||||
{{- define "service" -}}
|
||||
{{- $service_name := . }}
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue