Skip to main content

Projects

Manage your Canine projects from the command line.

List Projects​

View all projects in your account:

canine projects list

Output:

| ID | NAME        | NAMESPACE      | REPOSITORY_URL              | BRANCH | STATUS   | CLUSTER_ID | CLUSTER_NAME |
|----|-------------|----------------|-----------------------------|--------|----------|------------|--------------|
| 1 | my-app | my-app-prod | github.com/user/my-app | main | Deployed | 5 | production |
| 2 | api-service | api-service-ns | github.com/user/api-service | main | Deployed | 5 | production |

Project Status Values​

StatusDescription
CreatingProject is being set up
DeployedProject is running
DestroyingProject is being removed

Deploy a Project​

Trigger a deployment for a project:

canine projects deploy --name <PROJECT>

Options​

OptionDescription
--name <PROJECT>Project name (required)
--skip-buildSkip the build step and deploy existing image

Examples​

Deploy with a new build:

canine projects deploy --name my-app

Deploy without rebuilding:

canine projects deploy --name my-app --skip-build

Output:

Build started
View deployment: https://canine.sh/projects/my-app/deployments/abc123

Run Commands​

Run any command in your project's environment:

canine projects run --project <PROJECT> <COMMAND>

This command:

  1. Downloads the kubeconfig for your project's cluster
  2. Creates an ephemeral pod with your project's environment
  3. Executes the specified command

Examples​

Open an interactive shell:

canine projects run --project my-app /bin/sh

Open a Rails console:

canine projects run --project my-app bundle exec rails c

Open a Django shell:

canine projects run --project my-app python manage.py shell

Output:

Starting a one off container in: my-app...
Created one off pod: my-app-oneoff-abc123
Waiting for pod to be ready... |

The ephemeral pod is cleaned up automatically when the command exits.

Prerequisites​

The run command requires kubectl to be installed on your machine. See Installation for details.

List Processes​

View running pods/processes for a project:

canine projects processes --project my-app

Output:

| NAME                     | NAMESPACE | STATUS  |
|--------------------------|-----------|---------|
| my-app-web-abc123 | my-app-ns | Running |
| my-app-worker-def456 | my-app-ns | Running |

Process Status Values​

StatusDescription
PendingPod is being scheduled
RunningPod is running
SucceededPod completed successfully
FailedPod failed
UnknownStatus cannot be determined

View Logs​

Get logs from a running process:

canine projects logs --project <PROJECT>

If --process is not specified, you'll be prompted to select a process interactively.

Options​

OptionDescription
--project <PROJECT>Project name (required)
--process <PROCESS>Process name (interactive selection if omitted)
--tailFollow log output in real-time

Examples​

View logs for a specific process:

canine projects logs --project my-app --process my-app-web-abc123

Follow logs in real-time:

canine projects logs --project my-app --tail