Skip to content

Commit 34ed378

Browse files
Chore update readme to use hetzner cloud init (#24)
* chore: update readme to use hetzner cloud init * chore: update README.md with missing steps * fix: tailscale placeholder Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> --------- Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
1 parent f768588 commit 34ed378

File tree

1 file changed

+44
-10
lines changed

1 file changed

+44
-10
lines changed

README.md

Lines changed: 44 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,19 +1,53 @@
11
# docker-compose-container-registry-pull-through-caches
22

3+
# Deployment
34

4-
# Requirements
5+
To deploy in hetzner, go to Hetzner cloud console and look for the project called "container-registry-cache".
6+
7+
Create a new instance in hetzner cloud:
8+
- 3 or more vCPU's (e.g. CPX21 or CPX32)
9+
- Keep a public IPv4
10+
- Remove IPv6 address
11+
- Attach the firewall rule that blocks all incoming connections
12+
- Use cloud-init config below but update the --authKey for tailscale.
13+
14+
15+
You can create an authKey in tailscale as follows:
16+
17+
<img width="745" height="1164" alt="image" src="https://github.com/user-attachments/assets/bfced0e9-e3e0-4f89-87ca-21b0497ad988" />
518

6-
Install the basics:
7-
```bash
8-
curl -fsSL https://get.docker.com -o get-docker.sh && sudo sh get-docker.sh && sudo apt-get update && sudo apt install tmux git -y && sudo apt-get clean
9-
```
1019

20+
# cloud-init/config:
1121

22+
```yaml
23+
#cloud-config
1224

13-
# To deploy
25+
# --- 1. System Configuration ---
26+
# Sets the system hostname and manages the /etc/hosts file.
27+
# :exclamation:️ Replace "container-registry-cache-for-dev" with your desired hostname.
28+
hostname: container-registry-cache-for-dev
29+
manage_etc_hosts: true
1430

15-
```bash
16-
git clone https://github.com/GlueOps/docker-compose-container-registry-pull-through-caches.git
17-
cd docker-compose-container-registry-pull-through-caches/
18-
docker compose up -d
31+
# --- 2. Setup Commands ---
32+
runcmd:
33+
# Install Tailscale and Docker
34+
- 'curl -fsSL https://tailscale.com/install.sh | sh'
35+
- 'curl -fsSL https://get.docker.com -o get-docker.sh'
36+
- 'sh get-docker.sh'
37+
- 'sudo apt-get update && sudo apt install tmux git -y && sudo apt-get clean'
38+
39+
# Configure and connect to Tailscale in a single step
40+
# :exclamation:️ Replace "tskey-auth-..." with your actual Tailscale auth key.
41+
- ['tailscale', 'up', '--authkey=YOUR_TAILSCALE_AUTH_KEY_HERE', '--ssh']
42+
43+
# Secure the root account by disabling password login
44+
- ['passwd', '-d', 'root']
45+
46+
# Deploy the Docker Compose application
47+
# :exclamation:️ Replace the URL with the actual link to your compose file.
48+
- 'cd /opt && git clone https://github.com/GlueOps/docker-compose-container-registry-pull-through-caches.git'
49+
- 'cd /opt/docker-compose-container-registry-pull-through-caches && docker compose up -d'
1950
```
51+
52+
53+
Once you have an instance running, update the `dev-only-registry` DNS entry to use the new tailscale IP of the node you just added and assuming everything is working destroy the old hetzner node and remove it from tailscale

0 commit comments

Comments
 (0)