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.
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.
Services built from public repositories do not build automatically even if the auto-deploy switch is turned on.
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.
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.
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.
If a build fails, it won't be delivered to the container and the previous version will run instead.
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
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.
Hostman will suggest the most useful build directory for the framework selected.
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."
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."
When the service has been built, you'll receive a notification like this to the Slack channel you selected.