From 064c285fcfba43a09f1874b764374c9853b584d0 Mon Sep 17 00:00:00 2001 From: Marko Korhonen Date: Sat, 24 Feb 2024 01:03:40 +0200 Subject: [PATCH] Docker: migrate repo, index and website to docker volumes --- config-root.toml | 7 ++----- docker/caddy/docker-compose.toml | 11 +++++++---- root/etc/pacman.conf | 4 ++-- 3 files changed, 11 insertions(+), 11 deletions(-) diff --git a/config-root.toml b/config-root.toml index 987d318..1a8d209 100644 --- a/config-root.toml +++ b/config-root.toml @@ -167,9 +167,6 @@ dst = "/etc/doas.conf" src = "etc/flexo/flexo.toml" dst = "/etc/flexo/flexo.toml" -[profiles.Network] -dotfiles = ["d_network", "f_networkd.conf"] - [profiles.Locale] dotfiles = ["f_locale.conf", "f_locale.gen"] @@ -207,10 +204,10 @@ dotfiles = [ "f_welcomemessage.conf", "f_flexo.toml", ] -include = ["Locale", "Pacman", "Network"] +include = ["Locale", "Pacman"] [profiles.Moria] -include = ["Locale", "Pacman", "Network"] +include = ["Locale", "Pacman"] dotfiles = [ "f_99-sysctl.conf", "f_cmdline", diff --git a/docker/caddy/docker-compose.toml b/docker/caddy/docker-compose.toml index 9fe8cbd..7e2995c 100644 --- a/docker/caddy/docker-compose.toml +++ b/docker/caddy/docker-compose.toml @@ -1,6 +1,9 @@ [volumes] data = {} config = {} +wkd = {} +korhonen_cc = {} +index = {} [volumes.nextcloud_config] external = true @@ -12,13 +15,13 @@ restart = "unless-stopped" ports = ["80:80", "443:443/tcp", "443:443/udp"] networks = ["proxy"] volumes = [ + "./Caddyfile:/etc/caddy/Caddyfile", "data:/data", "config:/config", + "wkd:/var/www/wkd", + "korhonen_cc:/var/www/korhonen.cc", + "index:/var/www/index.korhonen.cc", "nextcloud_config:/var/www/nextcloud", - "/var/www/korhonen.cc:/var/www/korhonen.cc", - "/var/www/wkd:/var/www/wkd", - "/var/www/index.korhonen.cc:/var/www/index.korhonen.cc", - "./Caddyfile:/etc/caddy/Caddyfile", ] environment = ["CLOUDFLARE_EMAIL", "CLOUDFLARE_API_TOKEN", "ACME_AGREE=true"] diff --git a/root/etc/pacman.conf b/root/etc/pacman.conf index 2e56746..b380709 100755 --- a/root/etc/pacman.conf +++ b/root/etc/pacman.conf @@ -10,7 +10,7 @@ LocalFileSigLevel = Optional CacheDir = /var/cache/pacman/pkg {%@@ if profile == "Moria" @@%} CleanMethod=KeepCurrent -CacheDir=/var/www/index.korhonen.cc/repo/arch_linux/korhonen_aur/x86_64 +CacheDir= /var/lib/docker/volumes/caddy_index/_data/repo/arch_linux/korhonen_aur/x86_64 {%@@ endif @@%} [core] @@ -27,7 +27,7 @@ Include = /etc/pacman.d/mirrorlist [korhonen_aur] {%@@ if profile == "Moria" @@%} -Server = file:///var/www/index.korhonen.cc/repo/arch_linux/$repo/$arch +Server = file:///var/lib/docker/volumes/caddy_index/_data/repo/arch_linux/$repo/$arch {%@@ else @@%} Include = /etc/pacman.d/pacserve Server = https://index.korhonen.cc/repo/arch_linux/$repo/$arch