Deploy hesk.
- public_key [string]: ssh public key to be added to the created instance
- availability_zone [string]: availability zone in which the instance and volume will be created
To get availability zones from a region:
aws ec2 describe-availability-zones --region <region>
You can save the variables in a .tfvars
file and use the -var-file
argument to terraform.
Copy the .env.dist
to .env
inside 20-docker/
and fill with your variables.
MYSQL_ROOT_PASSWORD
: MySQL root passwordMYSQL_DATABASE
: MySQL database createdMYSQL_USER
: MySQL created user with permissions overMYSQL_DATABASE
MYSQL_PASSWORD
: MySQL password for the userDOMAIN
: defaults tolocalhost
. Domain to ask for certificate on Caddy.
To create and prepare the environment run:
- Inside
10-terraform
directory:terraform apply -var-file=".tfvars"
- Install docker with the compose plugin on the host, follow this guide.
- After configuring the
.env
file, rundocker compose up -d
and Hesk should be running. - Visit your domain and you should see the Hesk docs page. Navigate to
/install
, accept the terms and introduce the following:- Database host:
db
- Database name: same as the
MYSQL_DATABASE
environment variable - Database username: same as the
MYSQL_USER
environment variable - Database password:same as the
MYSQL_PASSWORD
environment variable
- Database host:
- After hitting install, you have to remove the
install
folder on the container. Do the following:
$ docker exec -it hesk_php bash
root@af1e7662a138:/var/www/html$ rm -rf install # inside the container
- Navigate to your domain on the path
/admin/
and everything should work properly.
To remove everything run:
- Inside
10-terraform
directory:terraform destroy -var-file=".tfvars"