-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
clickhouse: Add initial clickhouse configuration
- Loading branch information
Showing
8 changed files
with
73 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
data/ | ||
log/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
data/ | ||
log/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
# Clickhouse | ||
|
||
### Migration | ||
|
||
#### Python-Dependencies | ||
|
||
- clickhouse-migrations (See: https://github.com/zifter/clickhouse-migrations) | ||
|
||
#### Run Migration | ||
|
||
1. Add a migration file in the `migrations` directory. (must be ascending order) | ||
2. Run the following command to apply the migrations. | ||
```bash | ||
clickhouse-migrations \ | ||
--db-host $CLICKHOUSE_URL \ | ||
--db-user $CLICKHOUSE_USER \ | ||
--db-password $CLICKHOUSE_PASSWORD \ | ||
--db-name $CLICKHOUSE_DB \ | ||
--migrations-dir ./migrations | ||
``` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
services: | ||
clickhouse: | ||
image: clickhouse/clickhouse-server | ||
restart: always | ||
ports: | ||
- "127.0.0.1:8123:8123" | ||
- "127.0.0.1:9000:9000" | ||
ulimits: | ||
nofile: | ||
soft: 262144 | ||
hard: 262144 | ||
privileged: true | ||
volumes: | ||
- ./data:/var/lib/clickhouse | ||
- ./log:/var/log/clickhouse-server | ||
env_file: ../.env | ||
environment: | ||
CLICKHOUSE_DEFAULT_ACCESS_MANAGEMENT: 1 | ||
healthcheck: | ||
test: ["CMD", "clickhouse-client", "--query", "SELECT 1"] | ||
interval: 10s | ||
timeout: 5s | ||
retries: 3 | ||
networks: | ||
- clickhouse | ||
|
||
networks: | ||
clickhouse: | ||
name: clickhouse |