Skip to content

Commit 4fcfdec

Browse files
authored
Fix the website infra restart (#273)
1 parent 100479a commit 4fcfdec

3 files changed

Lines changed: 11 additions & 1 deletion

File tree

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
# Based on Hetzner's instructions:
2+
# https://docs.hetzner.com/cloud/floating-ips/persistent-configuration/#ubuntu-using-netplan
3+
4+
network:
5+
version: 2
6+
renderer: networkd
7+
ethernets:
8+
eth0:
9+
addresses: ["${server_ip}/32"]

website/infra/bootstrap/user_data.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,7 @@ runcmd:
5353
log_content /var/run/reboot-required
5454
log_content /var/run/reboot-required.pkgs
5555
56-
- ip addr add ${server_ip} dev eth0
56+
- netplan apply
5757

5858
- systemctl enable --now data-volume.service
5959

website/infra/cloud_init.tf

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@ locals {
66
bootstrap = "${path.module}/bootstrap"
77

88
template_files = {
9+
"60-static-ip.yaml" = "/etc/netplan/60-static-ip.yaml"
910
"umami.service" = "/etc/systemd/system/umami.service"
1011
"data-volume.service" = "/etc/systemd/system/data-volume.service"
1112
"docker-daemon.json" = "/etc/docker/daemon.json"

0 commit comments

Comments
 (0)