Step 1. Create a service
Step 2. Select the project to deploy
If you are logged in to Hostman with your GitHub, GitLab or Bitbucket account, at this point you will see the repository with your projects, including the private ones.
To access a different repository, click Connect another repository.
If you didn’t use your Git account credentials to log in, you’ll be able to access the necessary account now, and then select the project.
Step 3. Choose a server
Your Beego application must run on a specific cloud server. Choose the location and configuration of this server. You can upgrade it in the future.
Step 4. Configure the build settings
Next, the App customization window will appear.
First, select Go environment and then Another Go framework from the list of frameworks.
To deploy a Beego project you can use either a build command or a bash script containing build commands.
Here’s an example of the build command:
go get github.com/beego/beego && go build -o ./app main.go
To use a bash script instead, you’ll need to enter the path to that script into the Build command field, for example:
The script would probably contain the following:
go get github.com/beego/beego
go build -o ./app main.go
Here, ./app is the executable file compiled during build process, and main.go is the main file of your project.
If there are additional .go files in the project’s directory, you’ll need to enter them after main.go, separated by spaces.
If the project build requires additional modules, you can enter them into the build command separated by &&, or by adding new lines to your script.
Step 5. Deploy
Click Deploy to start the build process.
Once it starts, you will enter the deployment log. The log contains all the debugging data you'll need. If there are any issues with the code, you will get warning or error messages in the log, specifying the cause of the problem.
Usually it takes some time to install the cloud server during the first deployment.
When the deployment is complete, you will receive an e-mail notification and also see a similar log entry:
Your project is up and ready.