Skip to content

Conversation

@abdotop
Copy link
Member

@abdotop abdotop commented Oct 28, 2025

Add ClickHouse deployment tasks and update .gitignore

@abdotop abdotop requested a review from kigiri October 28, 2025 13:25
@abdotop abdotop self-assigned this Oct 28, 2025
@abdotop abdotop linked an issue Oct 28, 2025 that may be closed by this pull request
@abdotop abdotop force-pushed the 75-add-docker-support-for-clickhouse branch from 784e40f to b6ece02 Compare October 28, 2025 14:03
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"
Copy link
Member

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",
Copy link
Member

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 restart

Not 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 ?

@abdotop abdotop force-pushed the 75-add-docker-support-for-clickhouse branch from 6c76f1d to cc62f17 Compare October 28, 2025 15:43
-e CLICKHOUSE_PASSWORD=dev_password \
-e CLICKHOUSE_DEFAULT_ACCESS_MANAGEMENT=1 \
--ulimit nofile=262144:262144 \
clickhouse/clickhouse-server:latest
Copy link
Member

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:latest

@abdotop abdotop force-pushed the 75-add-docker-support-for-clickhouse branch from cc62f17 to b6382ca Compare October 29, 2025 07:58
@abdotop abdotop marked this pull request as ready for review October 29, 2025 09:16
@kigiri kigiri merged commit 5068fae into master Oct 29, 2025
2 checks passed
@kigiri kigiri deleted the 75-add-docker-support-for-clickhouse branch October 29, 2025 10:12
abdotop added a commit that referenced this pull request Nov 4, 2025
abdotop added a commit that referenced this pull request Nov 6, 2025
abdotop added a commit that referenced this pull request Nov 6, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Add Docker support for ClickHouse

3 participants