### Install okctl via Binary Source: https://ownkube.io/docs/cli Download the latest release archive for your platform and move the binary to your PATH. This example demonstrates installation for Apple silicon. ```bash curl -L https://github.com/ownkube/ownkube-cli/releases/latest/download/ownkube-cli_darwin_arm64.tar.gz | tar xz sudo mv okctl /usr/local/bin/ ``` -------------------------------- ### Deploy using okctl CLI Source: https://ownkube.io/docs/quickstart Install the okctl CLI, authenticate, and deploy the current directory. ```bash brew install ownkube/tap/okctl okctl login cd my-app okctl up ``` -------------------------------- ### Install okctl via pre-built binary Source: https://ownkube.io/cli Download and extract the pre-built binary for your specific OS and architecture. This example shows the command for macOS arm64. ```bash # macOS arm64 example curl -sSL https://github.com/ownkube/ownkube-cli/releases/latest/download/ownkube-cli_darwin_arm64.tar.gz \ | tar -xz -C /usr/local/bin okctl ``` -------------------------------- ### Get marketplace application details Source: https://ownkube.io/docs/cli/commands.md Retrieves information about what an app installs and its required inputs. ```bash okctl marketplace get ``` -------------------------------- ### Install and authenticate with okctl CLI Source: https://ownkube.io/blog/deploy-a-web-app-in-under-a-minute Use Homebrew to install the Ownkube CLI and authenticate your session in the browser. ```bash brew install ownkube/tap/okctl okctl login ``` -------------------------------- ### Quick start workflow Source: https://ownkube.io/cli Authenticate, link a directory to a deployment, and initiate the deployment process. ```bash # Log in via your browser okctl login # Point this directory at a deployment, then build and ship it okctl link okctl up # Watch it run okctl deploy logs ``` -------------------------------- ### Deploy marketplace application Source: https://ownkube.io/docs/cli/commands.md Installs an app with its database and cache. Use --cluster to target your own cluster instead of a region. ```bash okctl marketplace deploy [--region ] [--project ] [--environment ] [--name ] [--input KEY=VALUE] [--db-box ] [--cache-box ] ``` -------------------------------- ### Install k3s Source: https://ownkube.io/blog/eks-vs-k3s-on-aws-for-startups The command to install k3s on an EC2 instance using the provided installation script. ```bash curl -sfL https://get.k3s.io | sh - ``` -------------------------------- ### Install okctl from source Source: https://ownkube.io/cli Install the latest version of the CLI directly using the Go toolchain. ```bash go install github.com/ownkube/okctl@latest ``` -------------------------------- ### Define start script in package.json Source: https://ownkube.io/blog/deploy-express-node-api Ensure the package.json file includes a start script so Ownkube can execute the application entry point. ```json { "scripts": { "start": "node server.js" } } ``` -------------------------------- ### Connect to Postgres with pgx Source: https://ownkube.io/blog/deploy-go-app Example code for connecting to the Postgres database using the Go standard library and the pgx driver. ```go import ( "database/sql" "os" _ "github.com/jackc/pgx/v5/stdlib" ) db, err := sql.Open("pgx", os.Getenv("DATABASE_URL")) if err != nil { log.Fatal(err) } defer db.Close() ``` -------------------------------- ### Install Zed Source: https://ownkube.io/agents/zed Download the Zed editor from the official website and access the settings.json file. ```text Download Zed from zed.dev, then open settings.json. ``` -------------------------------- ### GET /api/v2/ask Source: https://ownkube.io/docs/deployments/create.md Searches documentation for an answer to a question. Returns relevant documentation snippets with source links. No authentication is required. ```APIDOC ## GET /api/v2/ask ### Description Searches documentation for an answer to a question. Returns relevant documentation snippets with source links. No authentication is required. ### Method GET ### Endpoint https://context7.com/api/v2/ask ### Parameters #### Query Parameters - **siteKey** (string) - Required - The site key for the documentation set. - **query** (string) - Required - URL-encoded question to search for. ### Response #### Success Response (200) Returns documentation that answers the question, with a source link for each part. If nothing matches, it says so. ``` -------------------------------- ### Subscribe to a billing plan Source: https://ownkube.io/docs/cli/commands.md Starts a personal or team plan. ```bash okctl billing subscribe personal|team ``` -------------------------------- ### Connect to Postgres using pg Source: https://ownkube.io/blog/deploy-express-node-api Example of initializing a PostgreSQL connection pool using the DATABASE_URL environment variable. ```javascript const { Pool } = require("pg"); const pool = new Pool({ connectionString: process.env.DATABASE_URL }); ``` -------------------------------- ### Example Environment Variable Configuration Source: https://ownkube.io/blog/manage-secrets-env-vars An example of how environment variables appear in the dashboard, including plain text variables and a secret key. ```text NODE_ENV=production LOG_LEVEL=info STRIPE_API_KEY=sk_live_... # flip Secret on this one ``` -------------------------------- ### Install Cursor Source: https://ownkube.io/agents/cursor Download and install the Cursor editor from the official website before configuring MCP settings. ```text Download Cursor from cursor.com, then open Settings, MCP. ``` -------------------------------- ### Deploy project prompt Source: https://ownkube.io/agents/claude-desktop Example prompt to use in the Claude Desktop chat interface to deploy a project to Ownkube Compute. ```text Deploy this project to Ownkube Compute and give me the live URL. ``` -------------------------------- ### Install okctl via Homebrew Source: https://ownkube.io/cli Use Homebrew to install the CLI on macOS or Linux. Shell completions are configured automatically. ```bash brew install ownkube/tap/okctl ``` -------------------------------- ### Install GitHub Copilot extension Source: https://ownkube.io/agents/github-copilot Prerequisite step to install VS Code and the GitHub Copilot extension, ensuring agent mode is enabled. ```text Install VS Code and the GitHub Copilot extension, then enable agent mode. ``` -------------------------------- ### Install Claude Desktop Source: https://ownkube.io/agents/claude-desktop Download the Claude Desktop application for macOS or Windows from the official website. ```text Download Claude for macOS or Windows from claude.ai/download. ``` -------------------------------- ### Create and monitor Ownkube clusters with okctl Source: https://ownkube.io/docs/own-cloud/create-cluster Use these okctl commands to create a starter or production Ownkube cluster and to check its status. The starter type creates one instance with no Ownkube fee; the production type provisions managed EKS with a starting floor of 8 vCPU and 16 GiB. Replace with your account ID (list them with okctl aws list) and with the actual cluster ID. ```bash # Starter: one instance, no Ownkube fee okctl clusters create --name dev --account --region eu-central-1 --type starter --node-type t3.large # Production: managed EKS with a starting floor of 8 vCPU and 16 GiB okctl clusters create --name prod --account --region eu-central-1 --type production --vcpu 8 --memory 16 # Watch it come up okctl clusters status ``` -------------------------------- ### Install Windsurf Source: https://ownkube.io/agents/windsurf Download the Windsurf IDE from the official website to access Cascade MCP settings. ```text Download Windsurf from codeium.com/windsurf, then open the Cascade MCP settings. ``` -------------------------------- ### Delete marketplace installation Source: https://ownkube.io/docs/cli/commands.md Removes an application installation as a single unit. ```bash okctl marketplace delete ``` -------------------------------- ### Install Claude Code Source: https://ownkube.io/agents/claude-code Install the Claude Code CLI tool globally using npm. ```terminal npm install -g @anthropic-ai/claude-code ``` -------------------------------- ### Install Codex CLI Source: https://ownkube.io/agents/codex Install the Codex package globally using npm. ```bash npm install -g @openai/codex ``` -------------------------------- ### Check environment and deployment status with okctl Source: https://ownkube.io/blog/add-managed-postgres-database Use the okctl CLI to log in, get environment details, and check deployment status. This is useful when scripting instead of using the dashboard. ```bash okctl login okctl environments get okctl deploy status ``` -------------------------------- ### Configuration Management Source: https://ownkube.io/docs/cli/commands.md Commands to view, get, or set CLI configuration parameters like apiUrl and outputFormat. ```bash okctl config view|get|set ``` -------------------------------- ### GET /api/v2/ask Source: https://ownkube.io/docs/billing/plans.md Searches documentation for an answer to a question. Returns relevant documentation snippets with source links. No API key is required. ```APIDOC ## GET /api/v2/ask ### Description Searches documentation for an answer to a question. Returns relevant documentation snippets with source links. No API key is required. ### Method GET ### Endpoint https://context7.com/api/v2/ask ### Parameters #### Query Parameters - **siteKey** (string) - Required - The site key for the documentation source. - **query** (string) - Required - URL-encoded question to search for. ### Response #### Success Response (200) - Returns documentation that answers the question, with a source link for each part. - If nothing matches, the response indicates that no matches were found. ### Response Example { "answer": "...", "sources": [ { "title": "...", "link": "..." } ] } ``` -------------------------------- ### Marketplace Commands Source: https://ownkube.io/docs/cli/commands Commands for managing marketplace applications, including listing, inspecting, dry-running, deploying, and deleting installations. ```bash okctl marketplace list ``` ```bash okctl marketplace get ``` ```bash okctl marketplace check ``` ```bash okctl marketplace deploy [--region ] [--project ] [--environment ] [--name ] [--input KEY=VALUE] [--db-box ] [--cache-box ] ``` ```bash okctl marketplace delete ``` -------------------------------- ### Utility Commands Source: https://ownkube.io/docs/cli/commands.md Commands for shell completion and checking the installed CLI version. ```bash okctl completion ``` ```bash okctl version ``` -------------------------------- ### Connect to a Postgres database with okctl connect Source: https://ownkube.io/docs/deployments/shell Opens psql against the database with the correct credentials. Requires psql installed on your machine. Works over private networking. ```bash okctl connect ``` -------------------------------- ### Run database migrations Source: https://ownkube.io/docs/deploy/flask.md Use the Ownkube Jobs resource to execute database migrations before the application starts, ensuring the schema is up to date. ```bash flask db upgrade ``` -------------------------------- ### Run Uvicorn for FastAPI Source: https://ownkube.io/docs/deploy/fastapi The command to start a FastAPI application using Uvicorn. Ensure the host is set to 0.0.0.0 and the port matches the one configured in the Ownkube deployment settings. ```bash uvicorn app.main:app --host 0.0.0.0 --port 8000 ``` -------------------------------- ### Cron expression examples Source: https://ownkube.io/blog/run-scheduled-cron-jobs Common cron expression patterns for scheduling jobs, including daily, interval-based, and day-of-week specific schedules. ```text # Every day at 2:00 AM UTC 0 2 * * * # Every 15 minutes */15 * * * * # Every Monday at 9:00 AM, in America/New_York 0 9 * * 1 ``` -------------------------------- ### Deployments Tools Source: https://ownkube.io/agents/codex Tools for managing deployments: create, list, get status, restart, and rollback. ```APIDOC ## Deployments Tools ### Description Tools for managing deployments on Ownkube Compute. ### Tools - create_deployment - list_deployments - get_deployment_status - restart_deployment - rollback_deployment ``` -------------------------------- ### GET /api/v2/ask Source: https://ownkube.io/docs/faq.md Searches documentation for answers to a question. Returns documentation snippets with source links for each part. No API key is needed. ```APIDOC ## [GET] /api/v2/ask ### Description Searches documentation for answers to a question. Returns documentation snippets with source links for each part. No API key is needed. ### Method GET ### Endpoint https://context7.com/api/v2/ask ### Parameters #### Query Parameters - **siteKey** (string) - Required - The site key for the documentation site. - **query** (string) - Required - The URL-encoded question to search for. ### Response #### Success Response (200) Returns documentation that answers the question, with a source link for each part. If nothing matches, it says so. #### Response Example { "answer": "...", "sources": [ { "text": "...", "link": "..." } ] } ``` -------------------------------- ### Dockerfile for Ownkube Django deployment Source: https://ownkube.io/blog/deploy-django-app Use this Dockerfile to deploy a Django app on Ownkube. It uses python:3.12-slim, installs system dependencies, installs Python requirements, collects static files at build time with placeholder SECRET_KEY and DATABASE_URL, and runs Gunicorn with 3 workers. The worker count is a starting point; adjust based on CPU vs I/O bound workload. ```dockerfile FROM python:3.12-slim RUN apt-get update -qq && apt-get install -y libpq-dev build-essential \ && rm -rf /var/lib/apt/lists/* WORKDIR /app COPY requirements.txt . RUN pip install --no-cache-dir -r requirements.txt COPY . . # Collect static files at build time, before SECRET_KEY exists at runtime RUN SECRET_KEY=build-only DATABASE_URL=sqlite:///build.db \ python manage.py collectstatic --noinput ENV PYTHONUNBUFFERED=1 EXPOSE 8000 CMD ["gunicorn", "myproject.wsgi:application", "--bind", "0.0.0.0:8000", "--workers", "3"] ``` -------------------------------- ### Create a project Source: https://ownkube.io/docs/cli/commands Creates a new project with a name, slug, and optional description and color. ```bash okctl projects create --name --slug [--description] [--color] ``` -------------------------------- ### Manage subdomains with okctl Source: https://ownkube.io/docs/networking/public-hostnames Use these commands to check availability, get suggestions, or update the subdomain for a deployment via the terminal. ```bash okctl deploy subdomain check my-app # is it free? okctl deploy subdomain suggest # suggestions near the current name okctl deploy subdomain set my-app # change it ``` -------------------------------- ### Install Ownkube CLI skills for coding agents Source: https://ownkube.io/docs/cli Add the Ownkube skill to your project or globally to enable coding agents to perform diagnostics and lookups. ```bash npx skills add ownkube/ownkube-cli npx skills add ownkube/ownkube-cli -g ``` -------------------------------- ### GET /api/v2/ask Source: https://ownkube.io/docs/data/valkey.md Searches documentation for a given query and returns relevant documentation snippets with source links. No API key is needed. ```APIDOC ## GET /api/v2/ask ### Description Searches documentation for a given query and returns relevant documentation snippets with source links. No API key is needed. ### Method GET ### Endpoint https://context7.com/api/v2/ask ### Parameters #### Query Parameters - **siteKey** (string) - Required - The site key for the documentation site. - **query** (string) - Required - The URL-encoded question to search for. ### Response #### Success Response (200) - Returns documentation that answers the question, with a source link for each part. - If nothing matches, it says so. #### Response Example (No explicit response example provided in the source.) ``` -------------------------------- ### Create and list deployments Source: https://ownkube.io/docs/cli/commands Commands for creating, listing, and managing deployment configurations. ```bash okctl deploy create -f app.json --project ``` ```bash okctl deploy list [--environment ] [--cluster ] ``` ```bash okctl deploy get ``` ```bash okctl deploy status ``` ```bash okctl deploy update -f app.json [--note] ``` ```bash okctl deploy rename ``` ```bash okctl deploy delete ``` -------------------------------- ### Configure release command for database migrations Source: https://ownkube.io/blog/deploy-rails-app Sets the db:migrate command to run before new Puma workers start, ensuring migrations execute ahead of the rollout. ```bash okctl apps update rails-app --release-command "bundle exec rails db:migrate" ``` -------------------------------- ### Configure release command for migrations Source: https://ownkube.io/blog/deploy-django-app Sets the migration command to run automatically before the application rollout, ensuring the database schema is updated before Gunicorn starts. ```bash okctl apps update django-app --release-command "python manage.py migrate --noinput" ``` -------------------------------- ### Run database migrations Source: https://ownkube.io/docs/deploy/rails Execute the rails db:migrate command as a Job to ensure migrations run to completion before the application starts serving traffic. ```bash rails db:migrate ``` -------------------------------- ### Use ioredis client to connect and cache data Source: https://ownkube.io/blog/add-valkey-redis-cache Use the ioredis client with the REDIS_URL environment variable to connect to the Valkey cache. The example sets a key with a 3600-second expiration and retrieves it. ```javascript import Redis from "ioredis"; const redis = new Redis(process.env.REDIS_URL); await redis.set("session:123", JSON.stringify({ userId: 1 }), "EX", 3600); const cached = await redis.get("session:123"); ``` -------------------------------- ### Create an environment Source: https://ownkube.io/docs/cli/commands Creates a new environment with a specified name, optional description, and color. ```bash okctl environments create --name [--description] [--color] ``` -------------------------------- ### Read configuration from the environment in main.go Source: https://ownkube.io/blog/deploy-go-app Demonstrates reading the PORT environment variable at startup, defaulting to 8080 if not set, and setting up a basic HTTP server. ```go package main import ( "log" "net/http" "os" ) func main() { port := os.Getenv("PORT") if port == "" { port = "8080" } mux := http.NewServeMux() mux.HandleFunc("/health", func(w http.ResponseWriter, r *http.Request) { w.WriteHeader(http.StatusOK) w.Write([]byte(`{"status":"ok"}`)) }) mux.HandleFunc("/", func(w http.ResponseWriter, r *http.Request) { w.Write([]byte("hello from Ownkube")) }) log.Printf("listening on %s", port) if err := http.ListenAndServe(":"+port, mux); err != nil { log.Fatal(err) } } ``` -------------------------------- ### Database connection string environment variables Source: https://ownkube.io/blog/manage-secrets-env-vars Example of the environment variables automatically generated and injected by Ownkube when a database deployment is attached to a web or worker deployment. ```text DATABASE_URL=postgresql://user:pass@host:5432/dbname PGHOST=... PGPORT=5432 PGUSER=... PGPASSWORD=... PGDATABASE=... ``` -------------------------------- ### List marketplace applications Source: https://ownkube.io/docs/cli/commands.md Displays the available application catalog. ```bash okctl marketplace list ``` -------------------------------- ### Install Kubernetes Events Exporter with Helm Source: https://ownkube.io/blog/kubernetes-event-monitoring-complete-guide Use this command to install the Ownkube Kubernetes Events Exporter into the monitoring namespace. ```bash helm install event-exporter \ oci://ghcr.io/ownkube/charts/kubernetes-events-exporter \ --namespace monitoring \ --create-namespace ``` -------------------------------- ### Manage deployments with okctl Source: https://ownkube.io/blog/deploy-a-web-app-in-under-a-minute Commands to list deployments and check the status of a specific deployment using its ID. ```bash okctl login okctl deploy list okctl deploy status ``` -------------------------------- ### List available boxes with okctl Source: https://ownkube.io/docs/billing/plans Use this command to list available compute boxes and their corresponding IDs for use in a manifest. ```bash okctl boxes list --kind web ``` -------------------------------- ### Manage billing and payments via CLI Source: https://ownkube.io/docs/billing/usage Commands for topping up credit, managing subscriptions, accessing the payment portal, and redeeming promo codes. Use the --no-browser flag to print the checkout URL instead of opening it. ```bash okctl billing top-up 10 # opens a checkout for a $10 top-up okctl billing subscribe personal # or team okctl billing portal # payment methods and invoices okctl billing redeem # apply a promo code ``` -------------------------------- ### List projects Source: https://ownkube.io/docs/cli/commands Lists all projects in the organization. ```bash okctl projects list ``` -------------------------------- ### Push and create the application Source: https://ownkube.io/blog/deploy-go-app Commands to authenticate, create the application from a Dockerfile, and deploy it to the Ownkube platform. ```bash okctl login okctl apps create go-app --dockerfile Dockerfile okctl deploy ``` -------------------------------- ### Write a multi-stage Dockerfile Source: https://ownkube.io/blog/deploy-go-app Uses a build stage to compile a static binary with CGO_ENABLED=0 and a final distroless stage to minimize image size. ```dockerfile FROM golang:1.23 AS build WORKDIR /src COPY go.mod go.sum ./ RUN go mod download COPY . . RUN CGO_ENABLED=0 GOOS=linux go build -ldflags="-s -w" -o /app/server . FROM gcr.io/distroless/static-debian12 COPY --from=build /app/server /server EXPOSE 8080 ENTRYPOINT ["/server"] ``` -------------------------------- ### Connect an app with secret variables Source: https://ownkube.io/docs/data/valkey Example of the secret variables added to an application after linking a Valkey cache. ```text REDIS_URL=redis://default:password@host:6379 REDIS_HOST=... REDIS_PORT=6379 REDIS_PASSWORD=... ``` -------------------------------- ### Manage build settings Source: https://ownkube.io/docs/cli/commands Commands to configure build logs, arguments, context, and builder size. ```bash okctl deploy build-logs ``` ```bash okctl deploy build-args --arg KEY=VALUE ``` ```bash okctl deploy build-context ``` ```bash okctl deploy builder-size small|standard|large ``` -------------------------------- ### Manage rollouts and history Source: https://ownkube.io/docs/cli/commands Commands for handling deployment revisions, restarts, and environment promotions. ```bash okctl deploy revisions ``` ```bash okctl deploy rollback ``` ```bash okctl deploy restart ``` ```bash okctl deploy rebuild ``` ```bash okctl deploy resync ``` ```bash okctl deploy auto-deploy --enabled=false ``` ```bash okctl deploy maintenance --enabled [--message] ``` ```bash okctl deploy promote --to ``` ```bash okctl deploy copy --to-environment [--to-cluster ] ``` ```bash okctl deploy move --project ``` -------------------------------- ### Manage connected accounts Source: https://ownkube.io/docs/cli/commands Commands to list, get, verify, resync, reconnect, or delete a connected AWS account by its ID. ```bash okctl aws list|get|verify|resync|reconnect|delete ``` -------------------------------- ### Dockerfile ARG and ENV configuration Source: https://ownkube.io/blog/manage-secrets-env-vars Example of using a build-time ARG to set an environment variable within a Dockerfile. ```dockerfile ARG SENTRY_RELEASE ENV SENTRY_RELEASE=$SENTRY_RELEASE ``` -------------------------------- ### Deploy an application with okctl up Source: https://ownkube.io/docs/cli Archives the working tree, uploads, builds, and deploys the application. If the directory is not linked, it creates a new web app with default settings. ```bash okctl up ``` -------------------------------- ### Check marketplace application deployment Source: https://ownkube.io/docs/cli/commands.md Performs a dry run to see what would be created and the associated costs. ```bash okctl marketplace check ``` -------------------------------- ### Listing Resources Source: https://ownkube.io/docs/cli/commands.md Commands to list available organizations, regions, and box sizes for deployments. ```bash okctl organizations list ``` ```bash okctl regions list ``` ```bash okctl boxes list [--kind web|database|cache] ``` -------------------------------- ### List environments Source: https://ownkube.io/docs/cli/commands Lists all environments in the organization. ```bash okctl environments list ``` -------------------------------- ### GET /api/v2/ask Source: https://ownkube.io/docs/own-cloud/custom-domains.md Searches documentation for an answer to a question. Returns relevant documentation snippets with source links. No API key is needed. ```APIDOC ## GET /api/v2/ask ### Description Searches documentation for an answer to a question. Returns relevant documentation snippets with source links. No API key is needed. ### Method GET ### Endpoint https://context7.com/api/v2/ask ### Parameters #### Query Parameters - **siteKey** (string) - Required - The site key for the documentation site. - **query** (string) - Required - URL-encoded question to search for. ### Response #### Success Response (200) Returns documentation that answers the question, with a source link for each part. If nothing matches, it says so. ``` -------------------------------- ### Initialize SQLAlchemy Async Engine Source: https://ownkube.io/blog/deploy-fastapi-app Create an asynchronous SQLAlchemy engine using the database URL from the application settings. ```python from sqlalchemy.ext.asyncio import create_async_engine engine = create_async_engine(settings.database_url, pool_pre_ping=True) ``` -------------------------------- ### Deploy cache-connection command Source: https://ownkube.io/docs/cli/commands Retrieves Valkey host, port, and password. ```bash okctl deploy cache-connection ``` -------------------------------- ### Deploy connection-info command Source: https://ownkube.io/docs/cli/commands Retrieves Postgres host, port, user, password, and connection string. ```bash okctl deploy connection-info ``` -------------------------------- ### Top-up billing wallet Source: https://ownkube.io/docs/cli/commands.md Opens a top-up checkout. Add --no-browser to print the URL instead. ```bash okctl billing top-up ``` -------------------------------- ### Run Prisma database migration Source: https://ownkube.io/blog/deploy-cal-com Execute this command as a one-off task against the application to apply schema migrations, especially if using a custom build. ```bash npx prisma migrate deploy ``` -------------------------------- ### Fetch deployment logs with okctl Source: https://ownkube.io/blog/deploy-a-web-app-in-under-a-minute Use this command to retrieve log entries for a specific deployment. The --range flag specifies the time window in seconds. ```bash okctl deploy logs --range 600 ``` -------------------------------- ### Kubernetes Event Object Structure Source: https://ownkube.io/blog/kubernetes-event-monitoring-complete-guide An example of a Kubernetes Event object showing key fields like reason, message, and involvedObject. ```yaml apiVersion: v1 kind: Event metadata: name: my-app-pod.17a6f8e2c namespace: production reason: BackOff message: "Back-off restarting failed container" type: Warning involvedObject: kind: Pod name: my-app-pod namespace: production count: 15 firstTimestamp: "2026-03-07T10:00:00Z" lastTimestamp: "2026-03-07T10:15:00Z" ``` -------------------------------- ### Define environment variables Source: https://ownkube.io/blog/deploy-docker-image Set runtime environment variables for the deployment. ```text DATABASE_URL=postgres://... NODE_ENV=production LOG_LEVEL=info ``` -------------------------------- ### Deploy a database using okctl Source: https://ownkube.io/docs/data/postgres Use the okctl deploy command to create a database resource defined in a JSON configuration file. ```bash okctl deploy create -f db.json ``` -------------------------------- ### Check usage and billing via CLI Source: https://ownkube.io/docs/billing/usage Use these commands to retrieve live burn rates, monthly spend, projections, history, and wallet balance directly from the terminal. ```bash okctl usage current # live hourly burn rate okctl usage month-to-date # spend so far this month, by line okctl usage projected # straight-line projection for the month okctl usage history # daily points; add -o json for full detail okctl billing wallet # prepaid wallet balance ``` -------------------------------- ### Configure build target settings Source: https://ownkube.io/blog/deploy-docker-image Specify the source repository, branch, and Dockerfile path for the build process. ```text Deploy new -> Web service Source: your-org/your-repo Branch: main Build target: Dockerfile (api/Dockerfile) ``` -------------------------------- ### n8n Docker Compose configuration Source: https://ownkube.io/blog/deploy-n8n A standard Docker Compose setup for n8n using a PostgreSQL database, which serves as a reference for manual VPS deployments. ```yaml services: postgres: image: postgres:17 environment: POSTGRES_DB: n8n POSTGRES_USER: n8n POSTGRES_PASSWORD: change-me volumes: - pgdata:/var/lib/postgresql/data n8n: image: n8nio/n8n:1.123.60 ports: - "5678:5678" environment: DB_TYPE: postgresdb DB_POSTGRESDB_HOST: postgres DB_POSTGRESDB_PORT: 5432 DB_POSTGRESDB_DATABASE: n8n DB_POSTGRESDB_USER: n8n DB_POSTGRESDB_PASSWORD: change-me N8N_HOST: n8n.example.com N8N_PROTOCOL: https WEBHOOK_URL: https://n8n.example.com/ N8N_ENCRYPTION_KEY: change-me-too depends_on: - postgres volumes: pgdata: ``` -------------------------------- ### Configure database connection Source: https://ownkube.io/blog/deploy-go-app Command to set the DATABASE_URL environment variable for the application. ```bash okctl env set DATABASE_URL="postgres://user:password@db-host:5432/go_app" --app go-app ``` -------------------------------- ### Redeem promo code Source: https://ownkube.io/docs/cli/commands.md Applies a promo code to the account. ```bash okctl billing redeem ``` -------------------------------- ### Manage hostnames Source: https://ownkube.io/docs/cli/commands Commands for checking, suggesting, and setting public subdomains. ```bash okctl deploy subdomain check ``` ```bash okctl deploy subdomain suggest [--desired