Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/tmsmr/coder-hcloud
One-shot deployment for Coder on Hetzner Cloud
https://github.com/tmsmr/coder-hcloud
coder hcloud
Last synced: about 1 month ago
JSON representation
One-shot deployment for Coder on Hetzner Cloud
- Host: GitHub
- URL: https://github.com/tmsmr/coder-hcloud
- Owner: tmsmr
- License: mit
- Created: 2022-12-05T19:03:30.000Z (about 2 years ago)
- Default Branch: main
- Last Pushed: 2022-12-11T11:51:08.000Z (about 2 years ago)
- Last Synced: 2024-11-01T18:37:11.644Z (about 2 months ago)
- Topics: coder, hcloud
- Language: HCL
- Homepage:
- Size: 22.5 KB
- Stars: 2
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
- awesome-coder - Coder on Hetzner Cloud - One-shot deployment for Coder on Hetzner Cloud (Automation / Miscellaneous)
README
# coder-hcloud
*Terraform based one-shot deployment of [Coder OSS](https://github.com/coder/coder) on a [Hetzner Cloud](https://www.hetzner.com/de/cloud) instance.*## Quickstart
- Copy `config.auto.tfvars.example` to `config.auto.tfvars`
- Adjust `config.auto.tfvars`
- `terraform init && terraform apply`
- Create DNS records
- Open Coder, login with the initial admin user
- (Install Templates from [coder-templates](https://github.com/tmsmr/coder-templates))## A little bit more details
### Configuration/Variables
| Variable | Default | Description |
|---------------|---------|---------------------------------------------------------------------------------------------------------|
| hcloud_apikey | | A R/W API-Key for the Hetzner Cloud project Coder shall be deployed in |
| instance_type | cx11 | Instance type (https://www.hetzner.com/de/cloud) for the Coder node |
| location | ngb1 | Location for the Coder node (nbg1, fsn1, hel1, ash) |
| coder_domain | | Desired Domain for Coder (Used for CODER_ACCESS_URL, CODER_WILDCARD_ACCESS_URL and Caddy/Let's Encrypt) |
| acme_email | | Administrative Email address used for Let's Encrypt and for the initial Coder user |### Deployment
**SSH**Terraform creates keys for the client and the host. The host key is installed later using Cloud-init. The client key is registered in the Hetzner Cloud project and can be used later for regular maintenance tasks. You may use the preconfigured wrapper script `./bin/ssh` for easy access.
**Firewall**
A Hetzner Cloud Firewall is applied. Outbound traffic is allowed generally. Inbound traffic is restricted to ICMP and HTTP 80, 443.
**Coder installation (Cloud-init)**
Coder is managed via Docker Compose (Adapted from https://github.com/coder/coder/blob/main/docker-compose.yaml).
- First, only Coder and Postgres is started...
- When Coder is ready, the initial admin account is created...
- After that, the Proxy (Caddy) is started as well**Maintenance**
While the Debian updates are mostly managed via `unattended-upgrades`, **you have to take care of the updates for the Docker Compose stack (`/root/coder/docker-compose.yaml`) manually!**