### Install dokku-clickhouse Plugin Source: https://context7.com/dokku/dokku-clickhouse/llms.txt Install the plugin into a running Dokku instance. Optionally disable automatic image pulls if images are pre-pulled manually. ```shell sudo dokku plugin:install https://github.com/dokku/dokku-clickhouse.git --name clickhouse ``` ```shell export CLICKHOUSE_DISABLE_PULL=true sudo dokku plugin:install https://github.com/dokku/dokku-clickhouse.git --name clickhouse ``` -------------------------------- ### Start ClickHouse Service Source: https://github.com/dokku/dokku-clickhouse/blob/master/README.md Starts a previously stopped ClickHouse service. ```shell dokku clickhouse:start lollipop ``` -------------------------------- ### Install Dokku ClickHouse Plugin Source: https://github.com/dokku/dokku-clickhouse/blob/master/README.md Install the ClickHouse plugin for Dokku. Ensure you are using Dokku version 0.19.x or later. ```shell sudo dokku plugin:install https://github.com/dokku/dokku-clickhouse.git --name clickhouse ``` -------------------------------- ### Start ClickHouse Service Source: https://github.com/dokku/dokku-clickhouse/blob/master/README.md Start a ClickHouse service that has been previously stopped. This resumes the service's operation. ```shell clickhouse:start ``` -------------------------------- ### dokku clickhouse:start / stop / pause / restart Source: https://context7.com/dokku/dokku-clickhouse/llms.txt Control the running state of the ClickHouse container, including starting, stopping, pausing, and restarting the service. ```APIDOC ## dokku clickhouse:start | stop | pause | restart ### Description Control the running state of the ClickHouse container. ### Method `dokku clickhouse: ` ### Parameters #### Path Parameters - **action** (string) - Required - The action to perform: `start`, `stop`, `pause`, or `restart`. - **service** (string) - Required - The name of the service. ### Example ``` # Start a previously stopped service dokku clickhouse:start lollipop # Stop a running service dokku clickhouse:stop lollipop ``` ``` -------------------------------- ### Control ClickHouse service lifecycle Source: https://context7.com/dokku/dokku-clickhouse/llms.txt Commands to manage the running state of the ClickHouse container, including starting, stopping, pausing, and restarting the service. ```shell dokku clickhouse:start lollipop dokku clickhouse:stop lollipop ``` -------------------------------- ### Get ClickHouse Service Information Source: https://github.com/dokku/dokku-clickhouse/blob/master/README.md Retrieve general or specific information about a ClickHouse service. Use flags to get details like config directory, DSN, exposed ports, or status. ```shell dokku clickhouse:info [--single-info-flag] ``` ```shell dokku clickhouse:info lollipop ``` ```shell dokku clickhouse:info lollipop --config-dir ``` ```shell dokku clickhouse:info lollipop --data-dir ``` ```shell dokku clickhouse:info lollipop --dsn ``` ```shell dokku clickhouse:info lollipop --exposed-ports ``` ```shell dokku clickhouse:info lollipop --id ``` ```shell dokku clickhouse:info lollipop --internal-ip ``` ```shell dokku clickhouse:info lollipop --initial-network ``` ```shell dokku clickhouse:info lollipop --links ``` ```shell dokku clickhouse:info lollipop --post-create-network ``` ```shell dokku clickhouse:info lollipop --post-start-network ``` ```shell dokku clickhouse:info lollipop --service-root ``` ```shell dokku clickhouse:info lollipop --status ``` ```shell dokku clickhouse:info lollipop --version ``` -------------------------------- ### Get ClickHouse Service Information Source: https://github.com/dokku/dokku-clickhouse/blob/master/README.md Print detailed information about a ClickHouse service. Specific information can be retrieved using single-info flags. ```shell clickhouse:info [--single-info-flag] ``` -------------------------------- ### dokku clickhouse:enter Source: https://context7.com/dokku/dokku-clickhouse/llms.txt Opens a bash prompt inside the running service container, allowing for direct interaction with the container's filesystem and processes. Changes made are not persisted. ```APIDOC ## dokku clickhouse:enter ### Description Opens a bash shell inside the running service container. ### Method `dokku clickhouse:enter [command]` ### Parameters #### Path Parameters - **service** (string) - Required - The name of the service container. - **command** (string) - Optional - A command to execute within the container. ### Example ``` # Interactive bash shell dokku clickhouse:enter lollipop # Run a single command dokku clickhouse:enter lollipop ls /var/lib/clickhouse ``` ``` -------------------------------- ### Connect to exposed ClickHouse service Source: https://context7.com/dokku/dokku-clickhouse/llms.txt Demonstrates how to connect to the ClickHouse service from outside the Dokku host after the ports have been exposed using `dokku clickhouse:expose`. ```shell clickhouse-client --host --port 9000 \ --user lollipop --password GENERATED_PASSWORD --database lollipop ``` -------------------------------- ### List All ClickHouse Service Links for App Source: https://github.com/dokku/dokku-clickhouse/blob/master/README.md List all ClickHouse service instances that are currently linked to a specific Dokku application. ```shell clickhouse:app-links ``` -------------------------------- ### Create a ClickHouse Service Source: https://github.com/dokku/dokku-clickhouse/blob/master/README.md Create a new ClickHouse service instance. Additional flags can be passed to the underlying ClickHouse server creation command. ```shell clickhouse:create [--create-flags...] ``` -------------------------------- ### dokku clickhouse:connect Source: https://context7.com/dokku/dokku-clickhouse/llms.txt Launches the `clickhouse client` CLI inside the running service container, authenticated as the service user. It can be used for interactive sessions or to run a query directly. ```APIDOC ## dokku clickhouse:connect ### Description Opens an interactive ClickHouse client or runs a query directly within the service container. ### Method `dokku clickhouse:connect [command]` ### Parameters #### Path Parameters - **service** (string) - Required - The name of the ClickHouse service. - **command** (string) - Optional - A command to execute directly within the client. ### Example ``` # Interactive client dokku clickhouse:connect lollipop # Run a query directly dokku clickhouse:connect lollipop clickhouse client --user=lollipop --password=PASS --query "SELECT count() FROM system.tables" ``` ``` -------------------------------- ### Connect to ClickHouse Service Source: https://github.com/dokku/dokku-clickhouse/blob/master/README.md Connect to a ClickHouse service using the command-line client. This is useful for direct interaction and debugging. ```shell clickhouse:connect ``` -------------------------------- ### Set GPG Public Key Encryption for Backups Source: https://github.com/dokku/dokku-clickhouse/blob/master/README.md Sets the GPG Public Key for encrypting backups of a ClickHouse service. The public key ID must be present on the keyserver 'keyserver.ubuntu.com'. ```shell dokku clickhouse:backup-set-public-key-encryption lollipop ``` -------------------------------- ### Set Multiple Networks for ClickHouse Service Source: https://github.com/dokku/dokku-clickhouse/blob/master/README.md Sets multiple networks for the ClickHouse service container to attach to. Networks should be comma-separated. ```shell dokku clickhouse:set lollipop post-create-network custom-network,other-network ``` -------------------------------- ### List ClickHouse App Links Source: https://github.com/dokku/dokku-clickhouse/blob/master/README.md Lists all ClickHouse services that are linked to a given app. ```shell dokku clickhouse:app-links playground ``` -------------------------------- ### clickhouse:create Source: https://context7.com/dokku/dokku-clickhouse/llms.txt Provisions a new ClickHouse service container with a generated password, dedicated data and config volumes, and waits for readiness on port 9000. Service names must match [A-Za-z0-9_-]+. ```APIDOC ## clickhouse:create ### Description Provisions a new ClickHouse service container with a generated password, dedicated data and config volumes, and waits for readiness on port 9000. Service names must match `[A-Za-z0-9_-]+`. ### Method `dokku clickhouse:create ` ### Parameters #### Path Parameters - **service_name** (string) - Required - The name for the ClickHouse service. #### Options - `--memory `: Set memory limit for the container (e.g., `512`). - `--password `: Specify a custom password for the ClickHouse service. - `--shm-size `: Set the shared memory size for the container (e.g., `256mb`). - `--initial-network `: Attach to a pre-existing Docker network on creation. - `--post-create-network `: Attach to additional Docker networks after creation, comma-separated. - `--custom-env "=;..."`: Pass custom environment variables to the container, semicolon-separated. ### Example ```bash # Basic creation dokku clickhouse:create lollipop # Pin a specific image version export CLICKHOUSE_IMAGE="clickhouse/clickhouse-server" export CLICKHOUSE_IMAGE_VERSION="25.1.0" dokku clickhouse:create lollipop # With memory limit (512 MB), custom password, and shm-size dokku clickhouse:create lollipop \ --memory 512 \ --password mysecretpassword \ --shm-size 256mb # Attach to a pre-existing Docker network on creation dokku clickhouse:create lollipop \ --initial-network my-overlay-net \ --post-create-network app-net,monitoring-net # Pass custom environment variables to the container dokku clickhouse:create lollipop --custom-env "TZ=UTC;CLICKHOUSE_MAX_CONNECTIONS=100" ``` ### Expected output ``` -----> Starting container -----> Waiting for container to be ready ======> Clickhouse container created: lollipop ======> lollipop clickhouse service information Config dir: /var/lib/dokku/services/clickhouse/lollipop/config Data dir: /var/lib/dokku/services/clickhouse/lollipop/data Dsn: clickhouse://lollipop:GENERATED_PASSWORD@dokku-clickhouse-lollipop:9000/lollipop ... ``` ``` -------------------------------- ### Configure GPG Backup Encryption for ClickHouse Source: https://context7.com/dokku/dokku-clickhouse/llms.txt Configures GPG public key encryption for ClickHouse service backups. The public key must be pre-uploaded to keyserver.ubuntu.com. Use 'backup-unset-public-key-encryption' to remove encryption. ```shell # Set GPG public key for backup encryption dokku clickhouse:backup-set-public-key-encryption lollipop FINGERPRINT_OR_KEY_ID # e.g. dokku clickhouse:backup-set-public-key-encryption lollipop 0x1234ABCD ``` ```shell # Remove GPG public key encryption dokku clickhouse:backup-unset-public-key-encryption lollipop ``` -------------------------------- ### dokku clickhouse:set Source: https://context7.com/dokku/dokku-clickhouse/llms.txt Configures network attachment properties for the ClickHouse service. Supported keys include `initial-network`, `post-create-network`, and `post-start-network`. ```APIDOC ## dokku clickhouse:set ### Description Set service properties, primarily for network attachment. ### Method `dokku clickhouse:set [value]` ### Parameters #### Path Parameters - **service** (string) - Required - The name of the service. - **key** (string) - Required - The property key to set (e.g., `post-create-network`). - **value** (string) - Optional - The value for the property. If omitted, the property is unset. ### Example ``` # Set a network to connect after service container creation dokku clickhouse:set lollipop post-create-network custom-network # Set multiple post-create networks dokku clickhouse:set lollipop post-create-network custom-network,monitoring-net # Unset a property dokku clickhouse:set lollipop post-create-network ``` ``` -------------------------------- ### Run a query directly using clickhouse:connect Source: https://context7.com/dokku/dokku-clickhouse/llms.txt Executes a non-interactive ClickHouse query directly against the service. Requires specifying the user, password, and the query itself. ```shell dokku clickhouse:enter lollipop clickhouse client --user=lollipop --password=PASS \ --query "SELECT count() FROM system.tables" ``` -------------------------------- ### List Apps Linked to ClickHouse Service Source: https://github.com/dokku/dokku-clickhouse/blob/master/README.md Display a list of all Dokku applications that are currently linked to a specified ClickHouse service. ```shell clickhouse:links ``` -------------------------------- ### Create ClickHouse Service Source: https://github.com/dokku/dokku-clickhouse/blob/master/README.md Use this command to create a new ClickHouse service. You can optionally specify custom image, image version, and environment variables. ```shell dokku clickhouse:create [--create-flags...] ``` ```shell dokku clickhouse:create lollipop ``` ```shell export CLICKHOUSE_IMAGE="clickhouse/clickhouse-server" export CLICKHOUSE_IMAGE_VERSION="${PLUGIN_IMAGE_VERSION}" dokku clickhouse:create lollipop ``` ```shell export CLICKHOUSE_CUSTOM_ENV="USER=alpha;HOST=beta" dokku clickhouse:create lollipop ``` -------------------------------- ### Promote ClickHouse Service for App Source: https://github.com/dokku/dokku-clickhouse/blob/master/README.md Promote a ClickHouse service to be the primary database for an application, setting the CLICKHOUSE_URL environment variable. ```shell clickhouse:promote ``` -------------------------------- ### List ClickHouse Service Links Source: https://github.com/dokku/dokku-clickhouse/blob/master/README.md Lists all apps linked to a specified ClickHouse service. ```shell dokku clickhouse:links lollipop ``` -------------------------------- ### clickhouse:list Source: https://context7.com/dokku/dokku-clickhouse/llms.txt Lists all provisioned ClickHouse services. ```APIDOC ## clickhouse:list ### Description Lists all provisioned ClickHouse services. ### Method `dokku clickhouse:list` ### Example ```bash dokku clickhouse:list # =====> Clickhouse services # lollipop # analytics-db # staging-ch ``` ``` -------------------------------- ### View ClickHouse service logs Source: https://context7.com/dokku/dokku-clickhouse/llms.txt Streams or fetches Docker container logs for the ClickHouse service. Options include showing all logs, tailing continuously, or showing a specific number of recent lines before tailing. ```shell dokku clickhouse:logs lollipop dokku clickhouse:logs lollipop --tail dokku clickhouse:logs lollipop --tail 50 ``` -------------------------------- ### Enter ClickHouse Service Container Source: https://github.com/dokku/dokku-clickhouse/blob/master/README.md Opens an interactive bash prompt within a running ClickHouse service container. Changes made inside the container are not saved to disk. ```shell dokku clickhouse:enter lollipop ``` -------------------------------- ### Set ClickHouse service network properties Source: https://context7.com/dokku/dokku-clickhouse/llms.txt Configures network attachment properties for a ClickHouse service. Valid keys include `initial-network`, `post-create-network`, and `post-start-network` to control when and how the service connects to networks. ```shell dokku clickhouse:set lollipop post-create-network custom-network dokku clickhouse:set lollipop post-create-network custom-network,monitoring-net dokku clickhouse:set lollipop post-start-network app-net dokku clickhouse:set lollipop post-create-network ``` -------------------------------- ### dokku clickhouse:promote Source: https://context7.com/dokku/dokku-clickhouse/llms.txt Promotes a secondary linked service to become the primary CLICKHOUSE_URL, preserving the old URL under an alternate alias. ```APIDOC ## dokku clickhouse:promote ### Description Promotes a secondary linked service to become the primary `CLICKHOUSE_URL`, preserving the old URL under an alternate alias. ### Method `dokku clickhouse:promote ` ### Parameters #### Path Parameters - **secondary_service** (string) - Required - The name of the secondary service to promote. - **app** (string) - Required - The name of the app where the promotion will occur. ### Example ``` dokku clickhouse:promote other_service playground ``` ``` -------------------------------- ### Inspection commands Source: https://context7.com/dokku/dokku-clickhouse/llms.txt Query the linking and existence state of ClickHouse services. ```APIDOC ## `clickhouse:app-links` / `clickhouse:links` / `clickhouse:linked` / `clickhouse:exists` — Inspection commands ### Description Query the linking and existence state of services. ### Methods - **`dokku clickhouse:app-links `**: Lists all ClickHouse services linked to a specific app. - **`dokku clickhouse:links `**: Lists all apps linked to a specific service. - **`dokku clickhouse:linked `**: Checks if a service is linked to an app (exit 0 = linked). - **`dokku clickhouse:exists `**: Checks if a service exists (exit 0 = exists). ### Examples ```shell # List all ClickHouse services linked to a specific app dokku clickhouse:app-links playground # lollipop # analytics-db # List all apps linked to a specific service dokku clickhouse:links lollipop # playground # staging-app # Check if a service is linked to an app (exit 0 = linked) dokku clickhouse:linked lollipop playground # Check if a service exists (exit 0 = exists) dokku clickhouse:exists lollipop ``` ``` -------------------------------- ### Link Another ClickHouse Service Source: https://github.com/dokku/dokku-clickhouse/blob/master/README.md Demonstrates linking a different ClickHouse service to the same application. This is useful when an application needs to connect to multiple ClickHouse instances. ```shell dokku clickhouse:link other_service playground ``` -------------------------------- ### clickhouse:link Source: https://context7.com/dokku/dokku-clickhouse/llms.txt Connects a ClickHouse service to a Dokku app using Docker native links. Sets `CLICKHOUSE_URL` in the app config and restarts the app by default. ```APIDOC ## clickhouse:link ### Description Connects a ClickHouse service to a Dokku app using Docker native links. Sets `CLICKHOUSE_URL` in the app config and restarts the app by default. ### Method `dokku clickhouse:link [--no-restart] [--alias ] [--querystring ]` ### Parameters #### Path Parameters - **service_name** (string) - Required - The name of the ClickHouse service. - **app_name** (string) - Required - The name of the Dokku app to link to. #### Options - `--no-restart`: Link the service without restarting the app. - `--alias `: Use a custom environment variable alias (e.g., `ANALYTICS_DB` instead of `CLICKHOUSE`). - `--querystring `: Append a querystring to the connection URL (e.g., `pool=5&timeout=30`). ### Example ```bash # Basic link (restarts app) dokku clickhouse:link lollipop playground # Link without restarting dokku clickhouse:link lollipop playground --no-restart # Link with a custom environment variable alias dokku clickhouse:link lollipop playground --alias ANALYTICS_DB # Sets ANALYTICS_DB_URL=clickhouse://lollipop:PASSWORD@dokku-clickhouse-lollipop:9000/lollipop # Append a querystring to the connection URL dokku clickhouse:link lollipop playground --querystring "pool=5&timeout=30" # Sets CLICKHOUSE_URL=clickhouse://...@...:9000/lollipop?pool=5&timeout=30 ``` ``` -------------------------------- ### List All ClickHouse Services Source: https://github.com/dokku/dokku-clickhouse/blob/master/README.md Displays a list of all ClickHouse services managed by Dokku. ```shell dokku clickhouse:list ``` -------------------------------- ### GPG Backup Encryption Source: https://context7.com/dokku/dokku-clickhouse/llms.txt Configures GPG public key encryption for ClickHouse service backups. The public key must be pre-uploaded to keyserver.ubuntu.com. ```APIDOC ## `clickhouse:backup-set-public-key-encryption` / `clickhouse:backup-unset-public-key-encryption` — GPG Backup Encryption ### Description Configures GPG public key encryption for service backups. The public key must be pre-uploaded to `keyserver.ubuntu.com`. ### Methods - **`dokku clickhouse:backup-set-public-key-encryption `**: Sets the GPG public key for backup encryption. - **`dokku clickhouse:backup-unset-public-key-encryption `**: Removes GPG public key encryption. ### Parameters #### Path Parameters - **service_name** (string) - Required - The name of the ClickHouse service. - **fingerprint_or_key_id** (string) - Required for `backup-set-public-key-encryption` - The GPG key ID or fingerprint. ### Examples ```shell # Set GPG public key for backup encryption dokku clickhouse:backup-set-public-key-encryption lollipop FINGERPRINT_OR_KEY_ID # e.g. dokku clickhouse:backup-set-public-key-encryption lollipop 0x1234ABCD # Remove GPG public key encryption dokku clickhouse:backup-unset-public-key-encryption lollipop ``` ``` -------------------------------- ### Enter ClickHouse Service Container Source: https://github.com/dokku/dokku-clickhouse/blob/master/README.md Enter the running container of a ClickHouse service or execute a command within it. Useful for advanced diagnostics. ```shell clickhouse:enter ``` -------------------------------- ### List All ClickHouse Services Source: https://github.com/dokku/dokku-clickhouse/blob/master/README.md Retrieve a list of all ClickHouse services managed by Dokku on the current server. ```shell clickhouse:list ``` -------------------------------- ### Set GPG Public Key Encryption for Backups Source: https://github.com/dokku/dokku-clickhouse/blob/master/README.md Configure GPG Public Key encryption for all future backups of a ClickHouse service. This enhances backup security. ```shell clickhouse:backup-set-public-key-encryption ``` -------------------------------- ### Create a ClickHouse Service Source: https://context7.com/dokku/dokku-clickhouse/llms.txt Provisions a new ClickHouse service container. Supports pinning image versions, setting memory limits, custom passwords, shm-size, attaching to existing Docker networks, and passing custom environment variables. ```shell dokku clickhouse:create lollipop ``` ```shell export CLICKHOUSE_IMAGE="clickhouse/clickhouse-server" export CLICKHOUSE_IMAGE_VERSION="25.1.0" dokku clickhouse:create lollipop ``` ```shell dokku clickhouse:create lollipop \ --memory 512 \ --password mysecretpassword \ --shm-size 256mb ``` ```shell dokku clickhouse:create lollipop \ --initial-network my-overlay-net \ --post-create-network app-net,monitoring-net ``` ```shell dokku clickhouse:create lollipop --custom-env "TZ=UTC;CLICKHOUSE_MAX_CONNECTIONS=100" ``` ```shell # Expected output: # -----> Starting container # -----> Waiting for container to be ready # =====> Clickhouse container created: lollipop # =====> lollipop clickhouse service information # Config dir: /var/lib/dokku/services/clickhouse/lollipop/config # Data dir: /var/lib/dokku/services/clickhouse/lollipop/data # Dsn: clickhouse://lollipop:GENERATED_PASSWORD@dokku-clickhouse-lollipop:9000/lollipop # ... ``` -------------------------------- ### Inspect ClickHouse Service Links and Existence Source: https://context7.com/dokku/dokku-clickhouse/llms.txt Commands to query the linking and existence state of ClickHouse services with applications. 'clickhouse:linked' checks if a service is linked to an app, and 'clickhouse:exists' checks if a service exists. ```shell # List all ClickHouse services linked to a specific app dokku clickhouse:app-links playground # lollipop # analytics-db ``` ```shell # List all apps linked to a specific service dokku clickhouse:links lollipop # playground # staging-app ``` ```shell # Check if a service is linked to an app (exit 0 = linked) dokku clickhouse:linked lollipop playground ``` ```shell # Check if a service exists (exit 0 = exists) dokku clickhouse:exists lollipop ``` -------------------------------- ### Link ClickHouse Service with Querystring Arguments Source: https://github.com/dokku/dokku-clickhouse/blob/master/README.md Links a ClickHouse service to an application and appends custom querystring arguments to the service link. This allows for fine-grained control over connection parameters. ```shell dokku clickhouse:link --querystring "pool=5" lollipop playground ``` -------------------------------- ### Link ClickHouse Service to App Source: https://github.com/dokku/dokku-clickhouse/blob/master/README.md Links a ClickHouse service to a specified application. This command uses native Docker links and will restart the application by default. Environment variables for the link are automatically set. ```shell dokku clickhouse:link lollipop playground ``` -------------------------------- ### Graceful restart Source: https://context7.com/dokku/dokku-clickhouse/llms.txt Performs a graceful restart of a ClickHouse service. ```APIDOC ## `clickhouse:restart` ### Description Gracefully restarts a ClickHouse service. ### Method `dokku clickhouse:restart ` ### Example ``` dokku clickhouse:restart lollipop ``` ``` -------------------------------- ### clickhouse:info Source: https://context7.com/dokku/dokku-clickhouse/llms.txt Displays complete service metadata or a single field via a flag. ```APIDOC ## clickhouse:info ### Description Displays complete service metadata or a single field via a flag. ### Method `dokku clickhouse:info [--flag]` ### Parameters #### Path Parameters - **service_name** (string) - Required - The name of the ClickHouse service. #### Flags - `--dsn`: Retrieve the DSN (Data Source Name). - `--status`: Retrieve the service status. - `--id`: Retrieve the container ID. - `--internal-ip`: Retrieve the internal IP address of the container. - `--version`: Retrieve the Docker image version. - `--exposed-ports`: Retrieve the exposed ports and their mappings. - `--links`: Retrieve the apps linked to this service. - `--config-dir`: Retrieve the path to the service's configuration directory. - `--data-dir`: Retrieve the path to the service's data directory. - `--initial-network`: Retrieve the initial Docker network attached. - `--post-create-network`: Retrieve the networks attached after creation. - `--post-start-network`: Retrieve the networks attached after starting. - `--service-root`: Retrieve the root directory for the service. ### Example ```bash # Full info dump dokku clickhouse:info lollipop # Retrieve individual fields dokku clickhouse:info lollipop --dsn # clickhouse://lollipop:abc123@dokku-clickhouse-lollipop:9000/lollipop dokku clickhouse:info lollipop --status # running dokku clickhouse:info lollipop --id # a3f2b1c9d0e7... dokku clickhouse:info lollipop --internal-ip # 172.17.0.3 dokku clickhouse:info lollipop --version # clickhouse/clickhouse-server:26.3.9.8 dokku clickhouse:info lollipop --exposed-ports # 9000->32771 8123->32772 dokku clickhouse:info lollipop --links # playground myapp ``` ``` -------------------------------- ### Link ClickHouse Service to App Source: https://context7.com/dokku/dokku-clickhouse/llms.txt Connects a ClickHouse service to a Dokku app using Docker native links. Sets `CLICKHOUSE_URL` in the app config and restarts the app by default. Supports linking without restarting, using custom aliases, and appending querystrings to the connection URL. ```shell # Basic link (restarts app) dokku clickhouse:link lollipop playground ``` ```shell # Link without restarting dokku clickhouse:link lollipop playground --no-restart ``` ```shell # Link with a custom environment variable alias dokku clickhouse:link lollipop playground --alias ANALYTICS_DB # Sets ANALYTICS_DB_URL=clickhouse://lollipop:PASSWORD@dokku-clickhouse-lollipop:9000/lollipop ``` ```shell # Append a querystring to the connection URL dokku clickhouse:link lollipop playground --querystring "pool=5&timeout=30" # Sets CLICKHOUSE_URL=clickhouse://...@...:9000/lollipop?pool=5&timeout=30 ``` -------------------------------- ### View ClickHouse Service Logs Source: https://github.com/dokku/dokku-clickhouse/blob/master/README.md Prints the most recent logs for a specified ClickHouse service. Use the --tail flag to continuously stream logs. ```shell dokku clickhouse:logs [-t|--tail] ``` ```shell dokku clickhouse:logs lollipop ``` ```shell dokku clickhouse:logs lollipop --tail ``` ```shell dokku clickhouse:logs lollipop --tail 5 ``` -------------------------------- ### dokku clickhouse:expose / dokku clickhouse:unexpose Source: https://context7.com/dokku/dokku-clickhouse/llms.txt Manages public port exposure for ClickHouse services. `expose` makes ClickHouse ports (9000 TCP and 8123 HTTP) accessible on the host via an ambassador container, while `unexpose` removes this exposure. ```APIDOC ## dokku clickhouse:expose / dokku clickhouse:unexpose ### Description Manage public port exposure for ClickHouse services. ### Method `dokku clickhouse:expose [host_port:container_port ...]` `dokku clickhouse:unexpose ` ### Parameters #### `expose` Parameters - **service** (string) - Required - The name of the service. - **host_port:container_port** (string) - Optional - Specify host and container ports to expose. Defaults to 9000 and 8123. #### `unexpose` Parameters - **service** (string) - Required - The name of the service. ### Example ``` # Expose on random host ports dokku clickhouse:expose lollipop # Expose on specific host ports dokku clickhouse:expose lollipop 9000 8123 # Expose on a specific IP and port dokku clickhouse:expose lollipop 127.0.0.1:9000 8123 # Remove public exposure dokku clickhouse:unexpose lollipop ``` ``` -------------------------------- ### Link ClickHouse Service to App Source: https://github.com/dokku/dokku-clickhouse/blob/master/README.md Link an existing ClickHouse service to a Dokku application. This makes the service's connection details available to the app. ```shell clickhouse:link [--link-flags...] ``` -------------------------------- ### Expose ClickHouse Service Ports Source: https://github.com/dokku/dokku-clickhouse/blob/master/README.md Expose a ClickHouse service on specified host:port combinations. If no ports are specified, it defaults to random ports on the 0.0.0.0 interface. ```shell clickhouse:expose ``` -------------------------------- ### dokku clickhouse:logs Source: https://context7.com/dokku/dokku-clickhouse/llms.txt Streams or fetches Docker container logs for the specified ClickHouse service. Supports tailing logs continuously or showing a specific number of recent lines. ```APIDOC ## dokku clickhouse:logs ### Description View service logs by streaming or fetching Docker container logs. ### Method `dokku clickhouse:logs [--tail [NUM]]` ### Parameters #### Path Parameters - **service** (string) - Required - The name of the service. #### Options - `--tail [NUM]` - Optional - Tail logs continuously, optionally showing the last NUM lines first. ### Example ``` # Show all logs dokku clickhouse:logs lollipop # Tail logs continuously dokku clickhouse:logs lollipop --tail # Show last 50 lines and tail dokku clickhouse:logs lollipop --tail 50 ``` ``` -------------------------------- ### Upgrade ClickHouse Service Source: https://github.com/dokku/dokku-clickhouse/blob/master/README.md Upgrades an existing ClickHouse service to a new image or image version. Various flags can be used to customize the upgrade process, such as passing extra arguments to the container create command, setting custom environment variables, specifying a new image or image version, and configuring network attachments. ```shell dokku clickhouse:upgrade lollipop ``` -------------------------------- ### Run Command in ClickHouse Service Container Source: https://github.com/dokku/dokku-clickhouse/blob/master/README.md Executes a specific command within a running ClickHouse service container. Filesystem changes are not persisted. ```shell dokku clickhouse:enter lollipop touch /tmp/test ``` -------------------------------- ### Connect to ClickHouse Service Source: https://github.com/dokku/dokku-clickhouse/blob/master/README.md Connects to a running ClickHouse service using the ClickHouse client tool. Note that disconnecting from SSH may leave zombie processes. ```shell dokku clickhouse:connect lollipop ``` -------------------------------- ### Run a single command in the ClickHouse service container Source: https://context7.com/dokku/dokku-clickhouse/llms.txt Executes a single command within the running ClickHouse service container. This is useful for quick checks or simple operations without opening an interactive shell. ```shell dokku clickhouse:enter lollipop ls /var/lib/clickhouse ``` -------------------------------- ### Promote ClickHouse Service Source: https://github.com/dokku/dokku-clickhouse/blob/master/README.md Promotes a ClickHouse service to be the primary one for an app. This action will restart the app and update environment variables. ```shell dokku clickhouse:promote other_service playground ``` -------------------------------- ### Expose ClickHouse Service on Specific IP and Ports Source: https://github.com/dokku/dokku-clickhouse/blob/master/README.md Exposes a ClickHouse service on specified ports, with the first port bound to a specific IP address (127.0.0.1). ```shell dokku clickhouse:expose lollipop 127.0.0.1:9000 8123 ``` -------------------------------- ### Link ClickHouse Service with Custom Alias Source: https://github.com/dokku/dokku-clickhouse/blob/master/README.md Links a ClickHouse service to an application using a custom alias for environment variables. This is useful for managing multiple ClickHouse instances or for specific naming conventions. ```shell dokku clickhouse:link --alias BLUE_DATABASE lollipop playground ``` -------------------------------- ### Expose ClickHouse Service on Default Ports Source: https://github.com/dokku/dokku-clickhouse/blob/master/README.md Exposes a ClickHouse service on its default ports, making it accessible from the public interface (0.0.0.0). ```shell dokku clickhouse:expose lollipop 9000 8123 ``` -------------------------------- ### Set Custom ClickHouse URL Scheme Source: https://github.com/dokku/dokku-clickhouse/blob/master/README.md Configures the application to use a custom scheme for the CLICKHOUSE_URL environment variable. This requires unlinking and relinking the service after setting the configuration. ```shell dokku config:set playground CLICKHOUSE_DATABASE_SCHEME=clickhouse2 dokku clickhouse:link lollipop playground ``` -------------------------------- ### Set HTTP ClickHouse URL Scheme Source: https://github.com/dokku/dokku-clickhouse/blob/master/README.md Configures the application to use the HTTP protocol for the CLICKHOUSE_URL environment variable. This adjusts the URL to match the HTTP interface of the ClickHouse service. ```shell dokku config:set playground CLICKHOUSE_DATABASE_SCHEME=http dokku clickhouse:link lollipop playground ``` -------------------------------- ### Upgrade a service Source: https://context7.com/dokku/dokku-clickhouse/llms.txt Upgrades a ClickHouse service to a new image version, stopping the current container, pulling the new image, and recreating the container with existing data and configuration. ```APIDOC ## `clickhouse:upgrade` — Upgrade a service to a new image version ### Description Stops the current container, pulls the new image, and recreates the container with the same data and config. ### Method `dokku clickhouse:upgrade [--image-version ] [--restart-apps ] [--image ] [--image-version ]` ### Parameters #### Path Parameters - **service_name** (string) - Required - The name of the service to upgrade. #### Flags - **--image-version** (string) - Optional - The specific image version to upgrade to. - **--restart-apps** (boolean) - Optional - Whether to force-restart all linked apps after upgrade. Defaults to false. - **--image** (string) - Optional - A custom Docker image to use for the upgrade. - **--image-version** (string) - Optional - The version of the custom image to use. ### Example ```shell # Upgrade to the latest configured version dokku clickhouse:upgrade lollipop # Upgrade to a specific version dokku clickhouse:upgrade lollipop --image-version 25.3.0 # Upgrade and force-restart all linked apps dokku clickhouse:upgrade lollipop --restart-apps true # Upgrade to a custom image dokku clickhouse:upgrade lollipop \ --image my-registry/clickhouse-server \ --image-version custom-26.3 ``` ``` -------------------------------- ### View ClickHouse Service Logs Source: https://github.com/dokku/dokku-clickhouse/blob/master/README.md Display the most recent log entries for a ClickHouse service. The `-t` flag can be used to tail logs, and an optional number specifies how many lines to show. ```shell clickhouse:logs [-t|--tail] ``` -------------------------------- ### Link ClickHouse Service Without Restart Source: https://github.com/dokku/dokku-clickhouse/blob/master/README.md Links a ClickHouse service to an application without automatically restarting the application. Use this if you want to manually control the restart process. ```shell dokku clickhouse:link --no-restart false lollipop playground ``` -------------------------------- ### Unset GPG Public Key Encryption for Backups Source: https://github.com/dokku/dokku-clickhouse/blob/master/README.md Disable GPG Public Key encryption for future backups of a ClickHouse service. Use this if encryption is no longer required. ```shell clickhouse:backup-unset-public-key-encryption ``` -------------------------------- ### Set ClickHouse Service Network Attachment Source: https://github.com/dokku/dokku-clickhouse/blob/master/README.md Sets the network to which the ClickHouse service container should attach after creation. This allows for custom network configurations. ```shell dokku clickhouse:set lollipop post-create-network custom-network ``` -------------------------------- ### Expose ClickHouse ports on the host Source: https://context7.com/dokku/dokku-clickhouse/llms.txt Exposes ClickHouse ports (9000 TCP and 8123 HTTP) on the host machine using an ambassador container. Ports can be exposed on random host ports, specific ports, or specific IP addresses. ```shell dokku clickhouse:expose lollipop dokku clickhouse:expose lollipop 9000 8123 dokku clickhouse:expose lollipop 127.0.0.1:9000 8123 ``` -------------------------------- ### Upgrade ClickHouse Service Source: https://github.com/dokku/dokku-clickhouse/blob/master/README.md Upgrade a ClickHouse service to a specified version. Ensure compatibility with your application before upgrading. ```shell clickhouse:upgrade [--upgrade-flags...] ``` -------------------------------- ### Upgrade ClickHouse Service Image Source: https://context7.com/dokku/dokku-clickhouse/llms.txt Upgrades a ClickHouse service to a new image version. This stops the container, pulls the new image, and recreates the container with existing data and configuration. You can specify a version or a custom image. ```shell dokku clickhouse:upgrade lollipop ``` ```shell dokku clickhouse:upgrade lollipop --image-version 25.3.0 ``` ```shell dokku clickhouse:upgrade lollipop --restart-apps true ``` ```shell dokku clickhouse:upgrade lollipop \ --image my-registry/clickhouse-server \ --image-version custom-26.3 ``` -------------------------------- ### Check if ClickHouse Service Exists Source: https://github.com/dokku/dokku-clickhouse/blob/master/README.md Verify the existence of a ClickHouse service by its name. Returns a success code if the service is found. ```shell clickhouse:exists ``` -------------------------------- ### Check if ClickHouse Service Exists Source: https://github.com/dokku/dokku-clickhouse/blob/master/README.md Checks if a specified ClickHouse service exists. ```shell dokku clickhouse:exists lollipop ``` -------------------------------- ### Pause a running service Source: https://context7.com/dokku/dokku-clickhouse/llms.txt Pauses a running ClickHouse service container without removing it. ```APIDOC ## `clickhouse:pause` ### Description Pauses a running ClickHouse service container. ### Method `dokku clickhouse:pause ` ### Example ``` dokku clickhouse:pause lollipop ``` ``` -------------------------------- ### dokku clickhouse:unlink Source: https://context7.com/dokku/dokku-clickhouse/llms.txt Removes the Docker link and unsets all associated environment variables from the app. It can be used to unlink a service with or without restarting the app. ```APIDOC ## dokku clickhouse:unlink ### Description Removes the Docker link and unsets all associated environment variables from the app. ### Method `dokku clickhouse:unlink ` ### Parameters #### Path Parameters - **service** (string) - Required - The name of the service to unlink. - **app** (string) - Required - The name of the app from which to unlink the service. #### Options - `--no-restart` - Optional - Unlink without restarting the app. ### Example ``` dokku clickhouse:unlink lollipop playground ``` ``` -------------------------------- ### Restart ClickHouse Service Source: https://github.com/dokku/dokku-clickhouse/blob/master/README.md Perform a graceful shutdown and restart of the ClickHouse service container. This is useful for applying configuration changes or recovering from minor issues. ```shell clickhouse:restart ``` -------------------------------- ### Restart ClickHouse Service Source: https://github.com/dokku/dokku-clickhouse/blob/master/README.md Performs a graceful shutdown and restart of the ClickHouse service container. ```shell dokku clickhouse:restart lollipop ``` -------------------------------- ### Pause ClickHouse Service Source: https://github.com/dokku/dokku-clickhouse/blob/master/README.md Pauses the running container for a ClickHouse service. ```shell dokku clickhouse:pause lollipop ``` -------------------------------- ### Check if ClickHouse Service is Linked to App Source: https://github.com/dokku/dokku-clickhouse/blob/master/README.md Determine if a specific ClickHouse service is currently linked to a given Dokku application. ```shell clickhouse:linked ``` -------------------------------- ### Set ClickHouse Service Property Source: https://github.com/dokku/dokku-clickhouse/blob/master/README.md Set or clear a specific configuration property for a ClickHouse service. This is useful for customizing service behavior. ```shell clickhouse:set ``` -------------------------------- ### Unset GPG Public Key Encryption for ClickHouse Backups Source: https://github.com/dokku/dokku-clickhouse/blob/master/README.md Use this command to disable GPG Public Key encryption for future backups of a ClickHouse service. This command takes the service name as an argument. ```shell dokku clickhouse:backup-unset-public-key-encryption ``` ```shell dokku clickhouse:backup-unset-public-key-encryption lollipop ``` -------------------------------- ### Destroy a ClickHouse Service Source: https://context7.com/dokku/dokku-clickhouse/llms.txt Permanently deletes a ClickHouse service container, its data, and configuration. Use the --force flag to skip confirmation. ```shell dokku clickhouse:destroy lollipop ``` ```shell dokku clickhouse:destroy lollipop --force ``` -------------------------------- ### Unexpose ClickHouse Service Source: https://github.com/dokku/dokku-clickhouse/blob/master/README.md Remove any custom port exposure previously set for a ClickHouse service. This makes the service inaccessible from outside the Dokku host unless linked to an app. ```shell clickhouse:unexpose ``` -------------------------------- ### Check if ClickHouse Service is Linked to App Source: https://github.com/dokku/dokku-clickhouse/blob/master/README.md Checks if a specified ClickHouse service is linked to a given app. ```shell dokku clickhouse:linked lollipop playground ``` -------------------------------- ### Unexpose ClickHouse Service Source: https://github.com/dokku/dokku-clickhouse/blob/master/README.md Unexposes a previously exposed ClickHouse service, removing its accessibility from the public interface (0.0.0.0). ```shell dokku clickhouse:unexpose lollipop ``` -------------------------------- ### Unlink ClickHouse Service from App Source: https://github.com/dokku/dokku-clickhouse/blob/master/README.md Unlinks a ClickHouse service from a specified application. This command will restart the application and unset related environment variables by default. ```shell dokku clickhouse:unlink lollipop playground ``` -------------------------------- ### Destroy ClickHouse Service Source: https://github.com/dokku/dokku-clickhouse/blob/master/README.md Delete a ClickHouse service, including its data and container. This action is irreversible and requires no active links to the service. ```shell clickhouse:destroy [-f|--force] ``` -------------------------------- ### Pause ClickHouse Service Source: https://github.com/dokku/dokku-clickhouse/blob/master/README.md Gracefully pause a running ClickHouse service container. This stops the service without removing its data. ```shell clickhouse:pause ``` -------------------------------- ### Unlink ClickHouse Service from App Source: https://github.com/dokku/dokku-clickhouse/blob/master/README.md Remove the link between a ClickHouse service and a Dokku application. This revokes the app's access to the service's connection details. ```shell clickhouse:unlink ``` -------------------------------- ### Stop ClickHouse Service Source: https://github.com/dokku/dokku-clickhouse/blob/master/README.md Stops a running ClickHouse service and removes its container. ```shell dokku clickhouse:stop lollipop ``` -------------------------------- ### Destroy a service Source: https://context7.com/dokku/dokku-clickhouse/llms.txt Permanently deletes a ClickHouse service, including its container, data, and configuration. ```APIDOC ## `clickhouse:destroy` — Permanently delete a service ### Description Deletes the service container, all data, and configuration. Requires no linked apps. ### Method `dokku clickhouse:destroy [--force]` ### Parameters #### Path Parameters - **service_name** (string) - Required - The name of the service to destroy. #### Flags - **--force** - Optional - Force delete without confirmation. ### Example ```shell # Interactive (prompts for service name confirmation) dokku clickhouse:destroy lollipop # Force delete without confirmation dokku clickhouse:destroy lollipop --force ``` ### Response #### Success Response ``` -----> Deleting -----> Removing data =====> Clickhouse container deleted: ``` ``` -------------------------------- ### Unlink a ClickHouse service from an app Source: https://context7.com/dokku/dokku-clickhouse/llms.txt Removes a Docker link to a ClickHouse service from an application and unsets all associated environment variables. The service can be unlinked with or without restarting the app. ```shell dokku clickhouse:unlink lollipop playground dokku clickhouse:unlink lollipop playground --no-restart ``` -------------------------------- ### Disable Docker Image Pulls for ClickHouse Service Source: https://github.com/dokku/dokku-clickhouse/blob/master/README.md Set the CLICKHOUSE_DISABLE_PULL environment variable to 'true' to prevent the plugin from automatically pulling Docker images. Ensure you manually pull the required images beforehand. ```shell export CLICKHOUSE_DISABLE_PULL=true ``` -------------------------------- ### Unlink ClickHouse Service Without Restart Source: https://github.com/dokku/dokku-clickhouse/blob/master/README.md Unlinks a ClickHouse service from an application without automatically restarting the application. Use this if you want to manually control the restart process. ```shell dokku clickhouse:unlink --no-restart false lollipop playground ``` -------------------------------- ### Stop ClickHouse Service Source: https://github.com/dokku/dokku-clickhouse/blob/master/README.md Stop a running ClickHouse service container. This halts the service without deleting its data. ```shell clickhouse:stop ``` -------------------------------- ### Unset ClickHouse Service Network Attachment Source: https://github.com/dokku/dokku-clickhouse/blob/master/README.md Unsets the post-create-network value for a ClickHouse service, reverting to default network attachment behavior. ```shell dokku clickhouse:set lollipop post-create-network ``` === COMPLETE CONTENT === This response contains all available snippets from this library. No additional content exists. Do not make further requests.