Setting up Hosty CLI
In order to use Hosty CLI, you need to have Docker and (optional, but recommended) Docker Compose installed on your local machine.
Hosty CLI is represented as a binary executable file inside the Docker image with all necessary dependencies already installed and configured.
In order to use it, you need to pull a Hosty CLI Docker image and execute hosty binary inside of it.
The easiest way to do this is to configure Docker Compose yaml file (compose.yml):
To see a list of Hosty CLI commands, run the following in the root of your project:
docker compose run --rm hosty_cli hosty list
It should show you the list of commands to manage your project on the hosting. Follow the instructions or request more information about each command by adding --help flag at to the end:
docker compose run --rm hosty_cli hosty build --help
For better DX, it is recommended to create a small helper bash script in the project root. To do this, execute the following commands in the project root:
Add the following content to hosty.sh:
Now, you can access Hosty CLI from the project root like this: ./hosty.sh list