Skip to content

Quick Introduction

CanaryCD can pull and deploy git repositories and manage static pages

Project


your git repository should contain at least a compose.yml (or docker-compose.yml).

a project requires a git remote and a corresponding branch, secrets can optionally be set and are available as environment variables. a repository authentication method can be assigned to a project.

Add Remote and Branch

Create a Project with git remote and branch

$ ccd project create --remote foo/bar@main
⠋ Creating Project.. delightful-skylark
 KEY         None
 AUTH_ID     None
 BRANCH      main
 REMOTE      git@github.com:foo/bar.git
 NAME        delightful-skylark
 ID          483724ea-25f4-4d50-95f0-3679ad15e4b3

Add Authentication Key

Authentication Keys are used to authenticate against git repositories, currently SSH Keys and Github PAT are supported

$ ccd auth create test --import test
ssh-ed25519 AAAAC3.. test
$ ccd auth create foo-key --ssh > repo-key.pub
Optional: Import SSH Git-Key to Github as Deploy-Key
$ gh repo deploy-key add repo-key.pub
$ ccd auth create test --type pat --key ghp_..

Assign the newly created Key to the Project

$ ccd project update foo --key my-key
Updating project delightful-skylark
 KEY         ssh:test                             
 AUTH_ID     7c083c42-1631-4924-90d8-72dd92e2dd2c 

Deployment

Start Deployment

$ ccd project deploy foo/bar@main --start
deployment started for delightful-skylark

Get Deployment Status

$ ccd project deploy foobar --status

  NAME                          IMAGE            STATE     STATUS         
 ──────────────────────────────────────────────────────────────────────── 
  delightful-skylark-whoami-1   traefik/whoami   running   Up 15 seconds  
$ ccd project deploy foobar --logs

Page


creating a page will dump traefik compatible dynamic configuration

Create

$ ccd page create example.com \
    --redirect www.example.com \
    --cors example2.com

Deploy

accepted payload types are .tar, .tar.gz and tar.bz2
tar cf payload.tar -C public/ .

supported default content folders are public, dist, site, docs

$ ccd page deploy example.com payload.tar

you can easily upload content using your and a dedicated authentication token

$ ccd page refresh-token foobar.com

Upload with curl"

$ curl -X POST -T payload.tar $HOST/webhook/page/BR6N23AZAPoLzpX..

Notifications


you can enable notifications globally to get notified about changes while deploying

ccd config set DISCORD_WEBHOOK https://discord.com/..
Discord Deploy Notification Example

ccd config set SLACK_WEBHOOK https://

Not Implemented

 

Was this page helpful?