Skip to content

Canine

Canine is an open-source, Kubernetes-native Platform-as-a-Service (PaaS) that brings the simplicity of Heroku’s developer experience to self-hosted Kubernetes clusters. It eliminates the operational complexity of managing containers while maintaining full control over your infrastructure and costs.

  • Kubernetes cluster v1.24+
  • kubectl configured with cluster access
  • Helm 3.x installed
  • Ingress controller (nginx-ingress or similar)
  • Storage class configured
# Add Canine Helm repository
helm repo add canine https://charts.canine.sh
helm repo update

# Install the Canine operator
helm install canine canine/canine \
  --namespace canine-system \
  --create-namespace \
  --set ingress.domain=your-domain.com \
  --set storage.class=standard

# Verify installation
kubectl get pods -n canine-system
kubectl get crd | grep canine
# Install ingress controller (if not present)
helm repo add ingress-nginx https://kubernetes.github.io/ingress-nginx
helm install ingress-nginx ingress-nginx/ingress-nginx \
  --namespace ingress-nginx \
  --create-namespace

# Verify ingress is running
kubectl get pods -n ingress-nginx
# macOS/Linux
curl -fsSL https://install.canine.sh | bash

# Verify installation
canine --version

# Shell completions
canine completion bash | sudo tee /etc/bash_completion.d/canine
# Login to your Canine cluster
canine login https://canine.your-domain.com

# Authenticate with API token
canine login --token YOUR_API_TOKEN https://canine.your-domain.com

# View current authentication
canine auth whoami

# Logout
canine logout
# Create app from git repository
canine apps:create myapp --git https://github.com/user/repo.git

# Create app from local directory
cd /path/to/app
canine apps:create myapp

# List all apps
canine apps:list

# Get app info
canine apps:info myapp
# Add Canine remote to git repository
git remote add canine https://git.canine.your-domain.com/myapp.git

# Deploy via git push
git push canine main

# Deploy specific branch
git push canine feature-branch:main

# View deployment logs
canine logs myapp --follow
canine logs myapp --num=100
# Check app status
canine apps:status myapp

# View recent deployments
canine releases:list myapp

# Rollback to previous release
canine releases:rollback myapp v5

# Get release details
canine releases:info myapp v5
# Canine auto-detects buildpacks based on Procfile and files
# Supported: Node.js, Python, Ruby, Go, Java, PHP, Rust, .NET

# View detected buildpack
canine apps:buildpacks myapp

# Force specific buildpack
canine config:set myapp BUILDPACK_URL=https://github.com/heroku/heroku-buildpack-python.git
# Use custom buildpack in Procfile or app config
canine config:set myapp \
  BUILDPACK_URL=https://github.com/example/custom-buildpack.git

# Stack (base image) selection
canine config:set myapp STACK=heroku-22  # heroku-22, heroku-24
# Create Procfile in app root
echo "web: npm start" > Procfile
echo "worker: npm run worker" >> Procfile

# Push to deploy
git add Procfile && git commit -m "Add Procfile" && git push canine main
# Set single variable
canine config:set myapp DATABASE_URL="postgres://..."

# Set multiple variables
canine config:set myapp \
  API_KEY="secret123" \
  API_SECRET="abc456" \
  ENVIRONMENT="production"

# View all config
canine config:show myapp

# Unset variable
canine config:unset myapp OLD_VAR

# Edit config interactively
canine config:edit myapp
# Export config as .env file
canine config:export myapp > .env

# Import config from file
canine config:import myapp < config.env

# Pull environment from production for local development
canine config:pull myapp > .env.local
# Scale web process
canine scale myapp --web=3

# Scale multiple processes
canine scale myapp --web=5 --worker=2 --scheduler=1

# View current dyno/replica configuration
canine dynos:list myapp
canine dynos:info myapp web

# Increase specific dyno count
canine dynos:scale myapp web=4
canine dynos:scale myapp worker=1
# Set resource limits for process
canine dyno:resize myapp web --memory=512Mi --cpu=500m

# Standard dyno configurations
# hobby: 512Mi memory, 100m CPU
# standard-1x: 512Mi memory, 250m CPU
# standard-2x: 1Gi memory, 500m CPU
# performance-m: 2.5Gi memory, 1000m CPU

# View resource usage
canine stats myapp
canine monitoring:metrics myapp --process=web
# Create PostgreSQL database
canine addons:create myapp postgres --plan=standard

# Create Redis cache
canine addons:create myapp redis --plan=cache

# Create MongoDB
canine addons:create myapp mongodb --plan=standard

# List available add-ons
canine addons:plans

# List provisioned add-ons
canine addons:list myapp
# Get add-on connection string
canine addons:info myapp postgres

# Backup database
canine addons:backups:create myapp postgres

# Restore from backup
canine addons:backups:restore myapp postgres backup-id

# Upgrade add-on plan
canine addons:upgrade myapp postgres --plan=premium

# Remove add-on
canine addons:destroy myapp redis
# Connection strings automatically injected as environment variables
# PostgreSQL: DATABASE_URL, PGHOST, PGPORT, PGUSER, PGPASSWORD
# Redis: REDIS_URL
# MongoDB: MONGODB_URI

# Access in application
# Node.js: process.env.DATABASE_URL
# Python: os.environ['DATABASE_URL']
# Go: os.Getenv("DATABASE_URL")
# Add custom domain
canine domains:add myapp example.com

# Add www subdomain
canine domains:add myapp www.example.com

# List domains
canine domains:list myapp

# Remove domain
canine domains:remove myapp old-domain.com
# View DNS records needed
canine domains:info myapp example.com

# Create CNAME record in your DNS provider
example.com CNAME myapp.canine-apps.com

# Verify DNS propagation
canine domains:verify myapp example.com

# Certificate status
canine certs:list myapp
# Automatic TLS via Let's Encrypt (default)
# Certificates auto-renew every 90 days

# View certificate details
canine certs:info myapp example.com

# Force certificate renewal
canine certs:force-renew myapp

# Upload custom certificate
canine certs:upload myapp example.com \
  --cert=cert.pem \
  --key=key.pem
# Stream application logs
canine logs myapp --follow

# View last 100 lines
canine logs myapp --num=100

# View logs from specific process
canine logs myapp --process=web

# View logs from last hour
canine logs myapp --tail=1h

# Search logs
canine logs myapp | grep ERROR
# View resource usage
canine stats myapp

# Memory and CPU metrics
canine monitoring:metrics myapp

# View metrics for specific process
canine monitoring:metrics myapp --process=worker

# Set up alerts
canine monitoring:alerts:create myapp \
  --metric=cpu \
  --threshold=80 \
  --action=scale

# List active alerts
canine monitoring:alerts:list myapp
# Add log drain to external service (Datadog, Papertrail, etc.)
canine log-drains:create myapp syslog://logs.example.com:514

# List log drains
canine log-drains:list myapp

# Remove log drain
canine log-drains:remove myapp drain-id
# .github/workflows/deploy.yml
name: Deploy to Canine

on:
  push:
    branches: [main]

jobs:
  deploy:
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v3
      
      - name: Deploy to Canine
        env:
          CANINE_API_TOKEN: ${{ secrets.CANINE_API_TOKEN }}
        run: |
          git remote add canine https://git.canine.your-domain.com/myapp.git
          git push canine main
# .gitlab-ci.yml
deploy:
  stage: deploy
  script:
    - git remote add canine https://git.canine.your-domain.com/myapp.git
    - git push canine main
  only:
    - main
# Deploy via API
curl -X POST https://canine.your-domain.com/apps/myapp/deployments \
  -H "Authorization: Bearer $CANINE_API_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{"ref":"main"}'
# Clone production config to staging
canine apps:clone myapp myapp-staging

# Or create from scratch
canine apps:create myapp-staging

# Copy config from production
canine config:show myapp | canine config:import myapp-staging

# Use separate git remote for staging
git remote add canine-staging https://git.canine.your-domain.com/myapp-staging.git
# Set environment-specific variables
canine config:set myapp-staging LOG_LEVEL=debug
canine config:set myapp-staging DATABASE_URL="postgres://staging-db"

# View environment-specific settings
canine config:show myapp-staging

# Promote staging to production
canine apps:promote myapp-staging myapp
# Deploy feature branch to staging
git push canine-staging feature-branch:main

# Deploy main to production
git push canine main

# Deploy tag
git tag v1.0.0 && git push canine v1.0.0:main
FeatureCanineHeroku
CostSelf-hosted (Kubernetes infrastructure)$7-50+/month per app
ControlFull infrastructure controlLimited customization
DeploymentGit push + Kubernetes nativeGit push only
ScalabilityUnlimited (cluster size)Pay-per-dyno pricing
Data LocationYour infrastructureHeroku managed
Learning CurveRequires Kubernetes knowledgeVery simple
CommunityGrowing open-sourceMature ecosystem
FeatureCanineDokku
ArchitectureKubernetes-nativeSingle-server Docker
ScalabilityMulti-node KubernetesSingle server
High AvailabilityBuilt-inManual setup
Add-onsFirst-class supportManual provisioning
Production ReadyYesSuitable for small deployments
DevOps ToolsNative KubernetesCustom bash scripts
FeatureCanineRailway
HostingSelf-hosted (your Kubernetes)Managed service
CostInfrastructure + Canine (free)Usage-based pricing
ControlComplete infrastructure accessLimited customization
Setup ComplexityRequires Kubernetes clusterMinutes to deploy
Data ResidencyYour serversRailway’s servers
Best ForTeams with K8s expertiseQuick prototyping
# Clone repository
git clone https://github.com/user/myapp.git
cd myapp

# Create app on Canine
canine apps:create myapp

# Add Canine remote
git remote add canine https://git.canine.your-domain.com/myapp.git

# Set environment variables
canine config:set myapp NODE_ENV=production

# Deploy
git push canine main

# Monitor logs
canine logs myapp --follow
# Provision PostgreSQL
canine addons:create myapp postgres --plan=standard

# Scale to 3 web processes
canine scale myapp --web=3

# Scale worker process
canine scale myapp --worker=2

# Monitor metrics
canine monitoring:metrics myapp
# Canine automatically performs rolling updates
# Old instances serve traffic while new instances start

# Check deployment status
canine releases:info myapp v10

# Rollback if needed
canine releases:rollback myapp v9
# View detailed build logs
canine logs myapp --num=200 | grep -i error

# Rebuild from source
canine builds:create myapp --source=HEAD

# Check buildpack detection
canine apps:buildpacks myapp
# Check app status
canine apps:status myapp

# View runtime logs
canine logs myapp --process=web --follow

# SSH into dyno for debugging
canine run myapp bash

# Check resource limits
canine stats myapp
# Verify add-on connectivity
canine addons:info myapp postgres

# Test database connection
canine run myapp psql $DATABASE_URL

# Check network policies
kubectl get networkpolicies -n default

# Restart app
canine apps:restart myapp