Deploys · Getting started
Quickstart
From a new project to your first reported deploy in five steps. You need a machine with bash and curl, and the command you deploy with today.
1. Choose a plan
Pick Deploys and a package on its page, name your project and pay. The project's environments, such as staging and production, are set at id, on the project's page: Deploys takes a deploy only to one of them.
2. Install the CLI
mybeast-deploy is one file from the latest release. Put it in a folder on your PATH; ~/.local/bin is one:
mkdir -p ~/.local/bin
curl -fsSLo ~/.local/bin/mybeast-deploy https://github.com/my-beast/cli/releases/latest/download/mybeast-deploy
chmod +x ~/.local/bin/mybeast-deploy
mybeast-deploy --versionIt needs bash 3.2 or later (macOS's own will do) and curl, nothing else. To check the download against the release's checksums, see Check the download.
3. Give it the address and a key
A server key lets a machine report the project's deploys, and nothing else. In Deploys, open the project's Settings, and under Deploys keys choose New key, of the kind Server secret. Copy it straight away: it's shown once. When the project also has Secrets, id may have put this key there already; the setup guide in Deploys says so.
Export MYBEAST_DEPLOYS_URL and MYBEAST_DEPLOYS_KEY, or keep them in ~/.config/mybeast/deploys.env, which only you may read. Put your key in place of sk_…:
mkdir -p ~/.config/mybeast
cat > ~/.config/mybeast/deploys.env <<'EOF'
MYBEAST_DEPLOYS_URL=https://services.my-beast.com/deploys
MYBEAST_DEPLOYS_KEY=sk_…
EOF
chmod 600 ~/.config/mybeast/deploys.envThe file is read, never run, and refused while others can read it. The key goes to curl on its standard input, never on a command line, and never to the command it runs.
4. Deploy through it
From the app's folder, put mybeast-deploy run in front of the command you deploy with:
mybeast-deploy run --app shop --env staging -- make deploy:staging--appnames the app: lower-case letters, digits and inner dashes. Its first deploy adds it.--envnames one of the project's environments. Deploys refuses any other, and says which it has.- After
--comes your own deploy command, as it is. Its prompts, such as a deploy password, work as before.
It prints the deploy's page first, then your command's output as always, then how it ended:
mybeast-deploy: Deploy #1 of shop to staging: https://services.my-beast.com/acme/storefront/deploys/apps/shop/deploys/1
…your deploy's own output, as always…
mybeast-deploy: Deploy #1 succeeded in 1m 32s, release a1b2c3d4e5f6: https://services.my-beast.com/acme/storefront/deploys/apps/shop/deploys/1The git checkout says the commit, and git's user.name says who you are. Until the app says how its builds are named, the release is the commit's first 12 characters: The line that names the release changes that.
Until the first deploy arrives, the project's home in Deploys is its setup guide. It opens the dashboard by itself once one starts.
5. Watch it, or go back
Open the link it printed. The deploy's page follows the log as it grows, every 2 seconds, and a failed deploy shows the line that most likely broke it.
If it went wrong, run your rollback command the same way:
mybeast-deploy rollback --app shop --env staging -- make rollback:stagingThe rollback is reported like a deploy, and the app's page shows what is live again. Roll back says where a rollback goes.
Next steps
- Set up an app: save its commands, so
mybeast-deploy run --app shop --env stagingneeds nothing after it. - Deploy from CI: the same reports from a runner.
- Hear when a deploy fails: e-mail, Telegram and Slack.
- Name each release in Errors: issues say which release brought them.