Deploy settings
  • 24 Jul 2020
  • 2 Minutes To Read
  • Contributors
  • Print
  • Share
  • Dark

Deploy settings

  • Print
  • Share
  • Dark

Hostman automates the deployment process and also provides you with CI/CD out of the box. All you need to do is connect your Github, Gitlab or Bitbucket repository and click "Deploy."

You can also set up your deploy for a custom build configuration, or select a Slack channel to which you would like Hostman to send deploy notifications.


Screen Shot 2020-06-15 at 1.17.38 PM.png

When the "auto-deploy" switch is turned on, Hostman will build your application each time you push the commit to your Git repository.

If you switch to a commit other than the previous one, make sure you've turned auto-deploy off. Hostman will build your application with the last available commit as soon as "auto-deploy" is turned on.

Public repositories

Services built from public repositories do not build automatically even if the auto-deploy switch is turned on.

Build command

Screen Shot 2020-06-15 at 1.21.22 PM.png

Most applications have to be built before they can be launched. Usually you need to install all dependencies first. Depending on the language and package manager, your project will contain package.json, requirements.txt or another file with dependencies.

Screen Shot 2020-06-15 at 1.44.25 PM.png

Hostman checks for these specific files and automatically installs all dependencies in your repository before the build. This means you don't need to specify things like yarn install or npm run install.

At the moment the repository is connected, Hostman attempts to check the framework and suggests the build command. Sometimes this is not possible, so you can specify the build command on your own.
Screen Shot 2020-06-15 at 1.35.52 PM.png

If you need more than one command to be executed, use && between commands – for example, npm run build && npm run generate. The second command will be executed only if the first one returns success.

We always perform a clean build; we don't cache anything. This protects against from build failures when the cache hinders the current build.

Only successful builds delivered

If a build fails, it won't be delivered to the container and the previous version will run instead.

Publish directory

Screen Shot 2020-06-15 at 1.46.58 PM.png

This option is only available for static websites and front-end frameworks. Once they've been built using the build command, for security the resulting code will be available in a directory other than the root directory.

Usually this is a dist or build directory, depending on the framework. If you don't know the publish directory for your framework, just choose the one you used when creating the service.

Screen Shot 2020-06-15 at 1.52.16 PM.png

Hostman will suggest the most useful build directory for the framework selected.


Screen Shot 2020-06-15 at 2.51.49 PM.png

You can deploy from any branch you have in your Git repository. To pull the code from a specific branch, choose it and click "Save build settings."

Build notifications

Screen Shot 2020-06-15 at 2.56.49 PM.png

After a build, Hostman sends a notification via email (enabled by default) or Slack. You can turn this setting on or off in the "Deploy" menu item.

When you turn on Slack notifications you are redirected to the Slack integration page. Please choose the channel to which you want to receive build notification and click "Allow."

Screen Shot 2020-06-15 at 2.55.04 PM.png

When the service has been built, you'll receive a notification like this to the Slack channel you selected.

Screen Shot 2020-06-15 at 3.05.40 PM.png

Was This Article Helpful?