### Starting Development Server with npm (Shell) Source: https://github.com/glasskube/distr.sh/blob/main/README.md Starts a local development server for the project, typically accessible in a web browser at `localhost:4321`. This command enables live reloading during development. ```shell npm run dev ``` -------------------------------- ### Install Distr Helm Chart with Dependencies (Shell) Source: https://github.com/glasskube/distr.sh/blob/main/src/content/docs/docs/self-hosting/kubernetes.md This command installs or upgrades the Distr Helm chart into the 'distr' namespace in your Kubernetes cluster. It pulls the chart from the ghcr.io OCI registry, waits for the deployment to complete, and explicitly enables the bundled PostgreSQL and MinIO components for a quick setup. ```shell helm upgrade --install --wait --namespace distr --create-namespace \n distr oci://ghcr.io/glasskube/charts/distr \n --set postgresql.enabled=true --set minio.enabled=true ``` -------------------------------- ### Example Docker Config After Fix (JSON) Source: https://github.com/glasskube/distr.sh/blob/main/src/content/docs/docs/guides/distr-on-macos.mdx An example of the Docker configuration file (`~/.docker/config.json`) after the `credStore` line has been successfully removed. ```JSON { "auths": {} } ``` -------------------------------- ### Installing Dependencies with npm (Shell) Source: https://github.com/glasskube/distr.sh/blob/main/README.md Installs all required project dependencies listed in the package.json file using npm. This command should be run from the root directory of the project. ```shell npm install ``` -------------------------------- ### Start Distr Hub Services with Docker Compose (Shell) Source: https://github.com/glasskube/distr.sh/blob/main/src/content/docs/docs/self-hosting/docker.md Starts the Distr Hub services defined in the 'docker-compose.yaml' file using the Docker Compose plugin in detached mode. Ensure Docker and the Docker Compose plugin are installed and the configuration files are present. ```shell docker compose up -d ``` -------------------------------- ### Example Docker Config with credStore (JSON) Source: https://github.com/glasskube/distr.sh/blob/main/src/content/docs/docs/guides/distr-on-macos.mdx An example of a Docker configuration file (`~/.docker/config.json`) that includes the `credStore` entry, which needs to be identified and removed. ```JSON { "auths": {}, "credStore": "desktop" } ``` -------------------------------- ### Getting Astro CLI Help with npm (Shell) Source: https://github.com/glasskube/distr.sh/blob/main/README.md Displays the help documentation and usage instructions for the Astro command-line interface. This is useful for understanding available Astro commands and options. ```shell npm run astro -- --help ``` -------------------------------- ### Install Distr SDK via npm Source: https://github.com/glasskube/distr.sh/blob/main/src/content/docs/docs/integrations/sdk.md Installs the Distr SDK package for JavaScript/TypeScript using npm. The --save flag adds the package as a dependency in your project's package.json file. ```shell npm install --save @glasskube/distr-sdk ``` -------------------------------- ### Example Output for Service Three Environment Endpoint Source: https://github.com/glasskube/distr.sh/blob/main/src/content/docs/docs/guides/docker-env-var-template.mdx Shows the expected JSON output from service three's /env endpoint, illustrating which environment variables are accessible to this specific service. ```json { "COMMON_VAR": "common_value" } ``` -------------------------------- ### Example Output for Service Two Environment Endpoint Source: https://github.com/glasskube/distr.sh/blob/main/src/content/docs/docs/guides/docker-env-var-template.mdx Shows the expected JSON output from service two's /env endpoint, illustrating which environment variables are accessible to this specific service. ```json { "COMMON_VAR": "common_value", "SERVICE2_VAR": "service2_value" } ``` -------------------------------- ### Example Output for Service One Environment Endpoint Source: https://github.com/glasskube/distr.sh/blob/main/src/content/docs/docs/guides/docker-env-var-template.mdx Shows the expected JSON output from service one's /env endpoint, illustrating which environment variables are accessible to this specific service. ```json { "COMMON_VAR": "common_value", "SERVICE1_VAR": "service1_value" } ``` -------------------------------- ### Install Distr Agent with Helm/Kubectl (Bash) Source: https://github.com/glasskube/distr.sh/blob/main/src/content/docs/docs/guides/end-customer-registry-view.mdx This command applies the Kubernetes manifest for the Distr agent using `kubectl apply`. It requires specifying the target namespace (`-n ...`) and connects to the Distr platform API using a valid target ID and secret. ```bash kubectl apply -n ... -f 'https://demo.distr.sh/api/v1/connect?targetId=...&targetSecret=...' ``` -------------------------------- ### Download Distr Docker Compose Files (Shell) Source: https://github.com/glasskube/distr.sh/blob/main/src/content/docs/docs/self-hosting/docker.md Downloads and extracts the latest Distr Docker Compose deployment files from GitHub into a new 'distr' directory. This command requires curl and tar to be installed. ```shell mkdir distr && cd distr && curl -fsSL https://github.com/glasskube/distr/releases/latest/download/deploy-docker.tar.bz2 | tar -jx ``` -------------------------------- ### Initial Helm values.yaml imagePullSecrets Configuration (YAML) Source: https://github.com/glasskube/distr.sh/blob/main/src/content/docs/docs/guides/helm-chart-registry-auth.md Shows examples of how the 'imagePullSecrets' field can be defined in a Helm chart's values.yaml file before processing by the Distr agent. It includes examples of an array, an empty array, and an empty object definition. ```yaml imagePullSecrets: - name: foo myAppServer: imagePullSecrets: [] myAppDb: imagePullSecrets: {} ``` -------------------------------- ### Install Distr Agent with Docker Compose (Bash) Source: https://github.com/glasskube/distr.sh/blob/main/src/content/docs/docs/guides/end-customer-registry-view.mdx This command downloads the Docker Compose configuration for the Distr agent directly from the Distr platform API and runs it in detached mode using `docker compose up -d`. It requires a valid target ID and secret. ```bash curl 'https://app.distr.sh/api/v1/connect?targetId=...&targetSecret=...' | docker compose -f - up -d ``` -------------------------------- ### Authenticating with Distr API using curl (Bash) Source: https://github.com/glasskube/distr.sh/blob/main/src/content/docs/docs/integrations/api.md Demonstrates how to authenticate a request to the Distr API using a Personal Access Token. The token must be included in the 'Authorization' header with the 'AccessToken' scheme. This example fetches a list of applications. ```bash curl 'https://app.distr.sh/api/v1/applications' \ -H "Authorization: AccessToken " ``` -------------------------------- ### Deleting Distr Docker Volume (macOS) Source: https://github.com/glasskube/distr.sh/blob/main/src/content/docs/docs/guides/distr-on-macos.mdx If a previous Distr installation attempt failed on Docker Desktop, a `distr_scratch` volume might exist. This command removes that volume to ensure a clean installation. ```sh docker volume rm distr_scratch ``` -------------------------------- ### Push Sample Docker Artifact to Distr Registry (Bash) Source: https://github.com/glasskube/distr.sh/blob/main/src/content/docs/docs/guides/how-to-registry.mdx Demonstrates how to pull a sample Docker image, tag it with the Distr registry URL and a version, and push it to the registry. Replace 'slug' with your registry slug and '1.0.0' with your desired tag. ```bash docker pull hello-world docker tag hello-world registry.distr.sh/slug/hello-world:1.0.0 docker push registry.distr.sh/slug/hello-world:1.0.0 ``` -------------------------------- ### Building Production Site with npm (Shell) Source: https://github.com/glasskube/distr.sh/blob/main/README.md Compiles and builds the project into a production-ready static website, outputting the files into the `./dist/` directory. This command prepares the site for deployment. ```shell npm run build ``` -------------------------------- ### Previewing Production Build with npm (Shell) Source: https://github.com/glasskube/distr.sh/blob/main/README.md Serves the previously built production site locally, allowing you to preview the final output before deploying it. This command runs from the project root. ```shell npm run preview ``` -------------------------------- ### Initialize DistrService with API Key Source: https://github.com/glasskube/distr.sh/blob/main/src/content/docs/docs/integrations/sdk.md Initializes the high-level DistrService client from the Distr SDK. Requires an API key (Personal Access Token) for authentication. Optionally allows specifying a custom API base URL for self-hosted instances. ```typescript import {DistrService} from '@glasskube/distr-sdk'; const service = new DistrService({ // to use your selfhosted instance, set apiBase: 'https://selfhosted-instance.company/api/v1', apiKey: '' }); // do something with the service ``` -------------------------------- ### Authenticate Docker with Distr Registry PAT (Bash) Source: https://github.com/glasskube/distr.sh/blob/main/src/content/docs/docs/guides/how-to-registry.mdx Authenticates the Docker client with the Distr Artifact Registry using a Personal Access Token (PAT). The PAT is provided via standard input, and no username is required. ```bash echo "YOUR-ACCESS-TOKEN" | docker login registry.distr.sh:8585 --password-stdin -u - ``` -------------------------------- ### Running Astro CLI Commands with npm (Shell) Source: https://github.com/glasskube/distr.sh/blob/main/README.md Provides a way to execute various commands from the Astro command-line interface within the project context. Replace `...` with the specific Astro command and its arguments. ```shell npm run astro ... ``` -------------------------------- ### Checking Code Style with npm (Shell) Source: https://github.com/glasskube/distr.sh/blob/main/README.md Executes the configured linter to check the project's code against predefined style and quality rules, often utilizing tools like Prettier. Run this from the project root. ```shell npm run lint ``` -------------------------------- ### Formatting Code with npm (Shell) Source: https://github.com/glasskube/distr.sh/blob/main/README.md Automatically formats the project's source code according to the configured style rules, commonly using a tool like Prettier. This helps maintain consistent code style. ```shell npm run format ``` -------------------------------- ### Pull Artifacts from Distr Registry (Bash) Source: https://github.com/glasskube/distr.sh/blob/main/src/content/docs/docs/guides/end-customer-registry-view.mdx These commands demonstrate how to pull artifacts from the Distr registry using different tools: Docker, ORAS, and Helm. Replace the artifact paths and versions with the actual details from the Customer Portal. ```bash docker pull registry.distr.sh/slug/hello-world:1.0.0 oras pull registry.distr.sh/slug/vendor-artifact:1.0.0 helm pull registry.distr.sh/slug/vendor-helm-chart:1.0.0 ``` -------------------------------- ### Run Docker Compose with .env File (Basic) Source: https://github.com/glasskube/distr.sh/blob/main/src/content/docs/docs/guides/docker-env-var-template.mdx Executes the basic Docker Compose configuration, instructing Docker to use the specified .env file to provide the necessary environment variables to the service. ```shell docker compose up --env .env ``` -------------------------------- ### Run Docker Compose with .env File (Multi-Service) Source: https://github.com/glasskube/distr.sh/blob/main/src/content/docs/docs/guides/docker-env-var-template.mdx Executes the multi-service Docker Compose configuration, providing environment variables from the .env file to the defined services. ```shell docker compose up --env .env ``` -------------------------------- ### Authenticate Docker with Distr Registry using PAT (Bash) Source: https://github.com/glasskube/distr.sh/blob/main/src/content/docs/docs/guides/end-customer-registry-view.mdx This command authenticates the Docker CLI with the Distr registry using a Personal Access Token (PAT). The PAT is provided via standard input to the `docker login` command. ```bash echo "YOUR-ACCESS-TOKEN" | docker login registry.distr.sh:8585 --password-stdin -u - ``` -------------------------------- ### Identify credStore Entry (JSON Snippet) Source: https://github.com/glasskube/distr.sh/blob/main/src/content/docs/docs/guides/distr-on-macos.mdx The specific line within the Docker configuration file (`~/.docker/config.json`) that needs to be identified and deleted. ```JSON "credStore": "desktop" ``` -------------------------------- ### Inspect Docker Config File (Shell) Source: https://github.com/glasskube/distr.sh/blob/main/src/content/docs/docs/guides/distr-on-macos.mdx Runs the `cat` command to display the current contents of the Docker configuration file located at `~/.docker/config.json`. ```Shell cat ~/.docker/config.json ``` -------------------------------- ### Verify Docker Config Change (Shell) Source: https://github.com/glasskube/distr.sh/blob/main/src/content/docs/docs/guides/distr-on-macos.mdx Runs the `cat` command again to display the contents of the Docker configuration file and verify that the `credStore` line is no longer present. ```Shell cat ~/.docker/config.json ``` -------------------------------- ### Checking Docker Context (macOS) Source: https://github.com/glasskube/distr.sh/blob/main/src/content/docs/docs/guides/distr-on-macos.mdx This command lists the available Docker contexts and indicates the currently active one. It's used to verify if the Docker CLI is pointing to the expected daemon endpoint. ```sh docker context ls ``` -------------------------------- ### Define Basic Docker Compose with Environment Variable Source: https://github.com/glasskube/distr.sh/blob/main/src/content/docs/docs/guides/docker-env-var-template.mdx Defines a simple Docker Compose service that references an environment variable (MY_VAR) using the ${VAR:?error} syntax, which requires the variable to be set during deployment. ```yaml version: '3.8' services: app: image: my-app environment: - MY_VAR=${MY_VAR:?error} ``` -------------------------------- ### Edit Docker Config File with Nano (Shell) Source: https://github.com/glasskube/distr.sh/blob/main/src/content/docs/docs/guides/distr-on-macos.mdx Opens the Docker configuration file (`~/.docker/config.json`) in the `nano` text editor, allowing for manual modification. ```Shell nano ~/.docker/config.json ``` -------------------------------- ### Define Multi-Service Docker Compose with Shared Environment Variables Source: https://github.com/glasskube/distr.sh/blob/main/src/content/docs/docs/guides/docker-env-var-template.mdx Configures multiple Docker services in a Compose file, demonstrating how to define common environment variables in an x- section and share them across services using YAML anchors and aliases. ```yaml version: '3.8' x-common-env: &common-env environment: - COMMON_VAR=${COMMON_VAR:?error} services: service1: image: service1-image <<: *common-env environment: - SERVICE1_VAR=${SERVICE1_VAR:?error} service2: image: service2-image <<: *common-env environment: - SERVICE2_VAR=${SERVICE2_VAR:?error} ``` -------------------------------- ### Provide Default Environment Variable Value (.env) Source: https://github.com/glasskube/distr.sh/blob/main/src/content/docs/docs/guides/docker-env-var-template.mdx Sets a default value for the MY_VAR environment variable in a .env file, which serves as a template that users can modify before deploying the application. ```dotenv MY_VAR=default_value ``` -------------------------------- ### Provide Default Environment Variables for Multiple Services (.env) Source: https://github.com/glasskube/distr.sh/blob/main/src/content/docs/docs/guides/docker-env-var-template.mdx Sets default values for both common and service-specific environment variables in a .env file, used as a template for the multi-service Docker Compose configuration. ```dotenv COMMON_VAR=common_default SERVICE1_VAR=service1_default SERVICE2_VAR=service2_default ``` -------------------------------- ### Enable Feature Flag in PostgreSQL Source: https://github.com/glasskube/distr.sh/blob/main/src/content/docs/docs/self-hosting/feature-flags.md This SQL command updates the 'features' column for a specific organization in the 'organization' table. It adds the 'licensing' string to the array stored in the 'features' column, effectively enabling the licensing feature for the organization identified by 'your-organization-id'. ```SQL update organization set features ='{licensing}' where id = 'your-organization-id'; ``` -------------------------------- ### Setting Docker Context to Default (macOS) Source: https://github.com/glasskube/distr.sh/blob/main/src/content/docs/docs/guides/distr-on-macos.mdx This command switches the active Docker context to `default`. This is necessary on macOS to ensure the Docker CLI connects to the standard `/var/run/docker.sock` endpoint, which Distr expects. ```sh docker context use default ``` -------------------------------- ### Transformed Helm values.yaml imagePullSecrets by Distr Agent (YAML) Source: https://github.com/glasskube/distr.sh/blob/main/src/content/docs/docs/guides/helm-chart-registry-auth.md Illustrates how the Distr agent modifies the 'imagePullSecrets' field in values.yaml. The agent injects a new secret name ('sh.distr.agent.v1.xxxxxx.pull') into existing arrays but leaves non-array definitions (like empty objects) unchanged. ```yaml imagePullSecrets: - name: foo - name: sh.distr.agent.v1.xxxxxx.pull myAppServer: imagePullSecrets: name: sh.distr.agent.v1.xxxxxx.pull myAppDb: # not changed because it is not an array imagePullSecrets: {} ``` === COMPLETE CONTENT === This response contains all available snippets from this library. No additional content exists. Do not make further requests.