705 B
705 B
Webservice automatic deployment on Hetzner Cloud
Getting started
First you need to create a python virtual environment and activate it:
python3 -m venv venv
source venv/bin/activate
Next you need to install required dependencies using pip:
pip install hcloud
To deploy the webservice simply run the deploy.py
script providing the token to Hetzner Cloud and ssh key as arguments:
python3 deploy.py <HETZNER_TOKEN> <PUBLIC_SSH_KEY>
To remove the created servers run the clean.py
script:
python3 clean.py <HETZNER_TOKEN>
You can also use the deploy.sh
script to run all above commands.
chmod +x deploy.sh
./deploy.sh <HETZNER_TOKEN> <PUBLIC_SSH_KEY>