lizard up

Upload the current directory and deploy it.

Usage

lizard up [path] [flags]

up packages your working tree (or path) as a tarball, sends it to the build nodes, and deploys it. It forces sourceType=upload on the target service, streams build logs over SSE, and prints the live URL when finished.

If the folder isn’t linked to a project, up links it to your account’s default project (the oldest project in your personal workspace) and deploys there, on a TTY and in CI alike. To deploy somewhere else, run lizard init --name <project> first or pass --project.

Which service up deploys to

  1. The service you name with --service. If the project has no service with that name, up creates it.
  2. The service linked to the folder.
  3. Otherwise, a service named after the name in package.json (without the scope) or the folder. On a TTY, up asks for the name and offers this one.

In the last case, if the project already has a service with that name, up deploys into it. Every up switches its target to upload source, so a GitHub service stops deploying on push. Pass --service to choose the target yourself.

Flags

FlagDescription
-s, --service <name>Service to deploy to (default: the linked service). If none has that name, up creates it
-p, --project <id>Project name, slug, or ID. In an unlinked folder, up links the folder to it and creates it if no project has that name
--build-command <cmd>Override the build command
--start-command <cmd>Override the start command
--pre-deploy-command <cmd>Run before the start command each time a container starts (every replica, every restart). Needs a start command; make it safe to run many times
--port <number>Container port (0 = worker mode). New services default to 3000 unless a Dockerfile EXPOSE sets it
--region <code>Region for a new service (default us-east-1); ignored for an existing one
-d, --detachStart the deploy and exit without streaming logs
-c, --ciStream build logs only and exit when the build ends
--no-gitignoreUpload everything, ignoring .gitignore

Subcommands

lizard up status <app-id>

Show a service’s status, URL, and latest build status. Pass the service ID that up --detach prints.

Examples

Deploy the current directory

lizard up

Deploy to a specific service with a custom start command and port

If api does not exist yet, up creates it.

lizard up --service api --start-command "node server.js" --port 8080

Deploy headlessly in CI

export LIZARD_TOKEN=liz_xxx
lizard init --name my-project
lizard up --ci --service api   # creates api on the first run

A failed build or deploy exits with code 1. With --ci, the exit code covers the build only, so check lizard ps --json before you mark the release done. --detach exits 0 once the upload is accepted. See framework setup.

See also

Updated