DockHostingDocs
Deploying

Deploy a folder with dock

No GitHub needed. dock deploy uploads your project folder, builds it and follows it until it's live.

dock is DockHosting's command-line tool. Its deploy command ships the folder you're in: handy when your code isn't on GitHub, for quick tests, or when you just prefer the terminal.

Install and sign in

curl -fsSL https://cli.dockhosting.dev/install.sh | sh
dock login

dock login opens your browser on a page that shows the request: the computer, its address and when it asked. Approve it only if it's yours.

app.dockhosting.dev/cli
Approving a dock sign-in in the browser

Deploy

cd my-app
dock deploy

The first time in a folder, dock:

  1. Detects your stack, the same way the dashboard does.
  2. Asks for the project's name, which variables from your .env to send, and whether to create a database.
  3. Shows what it will upload and asks to go ahead.
  4. Uploads the folder and follows the build until your app is live, then prints its address.

The folder is linked to the project (in .dock/project.json), so the next dock deploy just ships a new version.

~/my-app
$

What is uploaded

package.json
server.js
.env (skipped: set variables instead)

dock skips node_modules, vendor, .git, every .env* file and whatever your .gitignore lists. Uploads can be up to 200 MB compressed (1 GB and 50,000 files unpacked). The build installs your dependencies itself.

Your secrets stay out of the upload

.env files are never uploaded. dock asks which of their values to set as the project's variables, where they're stored encrypted.

Useful options

CommandWhat it does
dock deploy --yesNo questions: use what's linked and detected (for scripts)
dock deploy --newMake a new project for this folder instead of the linked one
dock logs --followStream your app's output
dock logs --buildThe latest build's log
dock statusThe project's state and latest deployment

See the full command reference.

On this page