CLIdock deploy

dock deploy

Deploy the current folder to DockHosting.

Plain English Deploy means “make this folder live on the internet.” DockHosting uploads your files, builds the app, starts a container, and points your app URL at it.

Usage

dock deploy
dock deploy --name my-app --type node
dock deploy --db my-postgres

Flags

FlagWhat it does
--nameProject name when creating a new project
--typeProject type when creating a new project
--dbLink a database by name before deploying

What it does

dock deploy looks for a project link in the current folder. If this folder is already linked, it deploys to that project. If it is not linked, the CLI lets you pick an existing project or create a new one.

Then it archives the current folder, skips common build/cache folders, uploads the archive, and streams the build log.

What is a project link? It is a small local record that stores the DockHosting project ID for this folder. That is why later commands can run as dock logs instead of dock logs my-app.

Ignored files

The upload skips common heavy folders by default:

  • .git
  • node_modules
  • vendor
  • .dock
  • .next
  • .nuxt
  • .output
  • dist
  • build
  • __pycache__

Add a .dockignore file to skip more files or folders.

Project type detection

The CLI checks files in your folder to guess the type:

FileDetected type
artisanLaravel
pom.xmlSpring Boot
nest-cli.jsonNestJS
nuxt.config.*Vue/Nuxt
next.config.*React/Next.js
requirements.txt or app.pyPython
composer.json or index.phpPHP
GemfileRuby
package.jsonReact
index.htmlStatic

Examples

dock deploy
dock deploy --name api --type node
dock deploy --db production-db

When to redeploy

Redeploy after changing:

  • app code
  • build settings
  • environment variables
  • linked databases
  • Dockerfile

Missing files? Files ignored by .dockignore are not uploaded. Do not ignore files your app needs at build or runtime.