The Apps service allows you to deploy an application using a Docker Compose file located in the repository. This enables running any type of application, including those built with frontend and backend frameworks not directly supported by the service.
Place the docker-compose.yml
file in the root of the repository.
Do not use ports 80 and 443 as host ports in the manifest. These ports are reserved for Nginx.
Proxying is configured for the first service listed in docker-compose.yml
. Other services, if they have host ports defined, will be accessible only via those explicit ports. For example:
services:
my-app:
ports:
- "9000:80"
adminer:
ports:
- "8080:8080"
In this case:
my-app
will be available at the main domain.adminer
will be available at http://<domain>:8080
.Volumes created in
docker-compose.yml
will not be persisted between deployments.
Select the repository with the application. The docker-compose.yml
must be placed at the root of the repository.
You can connect a repository:
From your GitHub, GitLab, or BitBucket account. Click on the platform name, log in and select the desired repository. If you are already logged in, Hostman will immediately show the available repositories.
By URL, providing a link to a repository created on any platform. Click Connect the repository via URL and enter the Git URL of the repository. If the repository is private, also enter the access details.
Read more about connecting repositories here.
Select a branch for deployment.
By default, we enable the Build by the last executed commit option. In this case, the App platform will deploy the latest commit, and later will automatically rebuild the application when you add new commits to the repository. If necessary, you can disable automatic deployment in the future.
If you want to select a specific commit manually, disable this option.
Your application must run on a separate cloud server. Select the region where the server should be located and its configuration.
You can always upgrade your server later, however, downgrading will not be possible.
Now, you can add the application to a private network and specify the IP address the app will use.
Note that you cannot change the private network after the deployment.
The App Platform will read the instructions from docker-compose.yml
and build the application accordingly.
At this point you can set variables if necessary. If they are already specified in docker-compose.yml
or in the Dockerfile, there's no need to duplicate them. The variables will be used during the Dockerfile
build stage, but currently, they cannot be passed into docker-compose.yml
.
Later on, you will be able to change any of these settings, as well as select a different branch and commit, and restart the deployment with new settings, if necessary.
Here you can specify a name and a comment for your application to be displayed in the Hostman dashboard. You can also select a project to add the app to.
These settings can also be changed later.
Click Start Deploy. Once the process starts, you will see the deployment log on the Deploy tab.
The deploy log contains all the necessary information to solve possible issues. If something goes wrong, for example, due to errors in the code, the deploy log will display the notification about it specifying the cause of the problem.
When you first deploy a project, the server installation may take some time. Once the process is completed, the application status will be updated, and you will also see a message about this in the log.
All done!
You can find the application's IP address and the technical domain linked to the app in the Dashboard tab. To link your own domain to the app, follow this guide.
The application runs on ports 80 and 443.
In the future, the App platform will monitor updates in the repository and, if automatic deployment is enabled, automatically rebuild the project with new changes.