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:
|
networks:
|
||||||
- openreplay-net
|
- openreplay-net
|
||||||
volumes:
|
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:
|
environment:
|
||||||
CH_HOST: "clickhouse-openreplay-clickhouse.db.svc.cluster.local"
|
CH_HOST: "clickhouse-openreplay-clickhouse.db.svc.cluster.local"
|
||||||
CH_PORT: "9000"
|
CH_PORT: "9000"
|
||||||
|
|
@ -161,7 +161,7 @@ services:
|
||||||
done
|
done
|
||||||
|
|
||||||
echo "clickhouse is up - executing command"
|
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:
|
alerts-openreplay:
|
||||||
image: public.ecr.aws/p1t3u8a3/alerts:${COMMON_VERSION}
|
image: public.ecr.aws/p1t3u8a3/alerts:${COMMON_VERSION}
|
||||||
|
|
|
||||||
|
|
@ -142,7 +142,7 @@ services:
|
||||||
networks:
|
networks:
|
||||||
- openreplay-net
|
- openreplay-net
|
||||||
volumes:
|
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:
|
environment:
|
||||||
CH_HOST: "{{.Values.global.clickhouse.chHost}}"
|
CH_HOST: "{{.Values.global.clickhouse.chHost}}"
|
||||||
CH_PORT: "{{.Values.global.clickhouse.service.webPort}}"
|
CH_PORT: "{{.Values.global.clickhouse.service.webPort}}"
|
||||||
|
|
@ -155,13 +155,13 @@ services:
|
||||||
- |
|
- |
|
||||||
# Checking variable is empty. Shell independant method.
|
# Checking variable is empty. Shell independant method.
|
||||||
# Wait for Minio to be ready
|
# 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..."
|
echo "Waiting for Minio server to be ready..."
|
||||||
sleep 1
|
sleep 1
|
||||||
done
|
done
|
||||||
|
|
||||||
echo "clickhouse is up - executing command"
|
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" -}}
|
{{- define "service" -}}
|
||||||
{{- $service_name := . }}
|
{{- $service_name := . }}
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue