-
Notifications
You must be signed in to change notification settings - Fork 0
DT-75: Add Docker support for ClickHouse #76
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
784e40f to
b6ece02
Compare
deno.json
Outdated
| "clickhouse:stop": "deno run -A tasks/deploy-clickhouse.ts --action=stop --env=dev", | ||
| "clickhouse:restart": "deno run -A tasks/deploy-clickhouse.ts --action=restart --env=dev", | ||
| "clickhouse:status": "deno run -A tasks/deploy-clickhouse.ts --action=status --env=dev", | ||
| "clickhouse:remove": "deno run -A tasks/deploy-clickhouse.ts --action=remove --env=dev" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nit pick on cli api design, to have the action as a named argument is wierd.
-deno run -A tasks/deploy-clickhouse.ts --action=remove --env=dev"
+deno run -A tasks/deploy-clickhouse.ts remove --env=dev"Make the first position argument the action no ? feels more natural, example: git push ... and not git action=push
deno.json
Outdated
| "clickhouse:deploy": "deno run -A tasks/deploy-clickhouse.ts --env=dev", | ||
| "clickhouse:deploy:prod": "deno run -A tasks/deploy-clickhouse.ts --env=prod", | ||
| "clickhouse:stop": "deno run -A tasks/deploy-clickhouse.ts --action=stop --env=dev", | ||
| "clickhouse:restart": "deno run -A tasks/deploy-clickhouse.ts --action=restart --env=dev", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I feel like env should be read from an environment variable. we use like APP_ENV=dev or APP_ENV=prod in tournament, I think this could apply to ?
you can pass an env argument from here too no ? like so ?
APP_ENV=dev deno run -A tasks/deploy-clickhouse.ts restartNot sure we want to do prod / not prod variant from here too, maybe this should be done by switching the env when you call or defining a .env file, maybe add the --env-file arg ?
6c76f1d to
cc62f17
Compare
| -e CLICKHOUSE_PASSWORD=dev_password \ | ||
| -e CLICKHOUSE_DEFAULT_ACCESS_MANAGEMENT=1 \ | ||
| --ulimit nofile=262144:262144 \ | ||
| clickhouse/clickhouse-server:latest |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
if the env file is created, you can pass the env with --env-file:
docker run -d \
--name clickhouse-dev \
-p 8123:8123 \
-p 9000:9000 \
-v ./db/clickhouse-dev:/var/lib/clickhouse \
--ulimit nofile=262144:262144 \
--env-file=.env.dev \
clickhouse/clickhouse-server:latestcc62f17 to
b6382ca
Compare
Add ClickHouse deployment tasks and update .gitignore