fixed caddy container and added acme

This commit is contained in:
Timo Boomers 2025-04-26 11:49:14 +02:00
parent fcc9fe0773
commit 8dbddaf62d
4 changed files with 31 additions and 7 deletions

View File

@ -0,0 +1,8 @@
FROM caddy:2.8-builder AS builder
RUN xcaddy build \
--with github.com/caddy-dns/transip
FROM caddy:2.8
COPY --from=builder /usr/bin/caddy /usr/bin/caddy

View File

@ -56,8 +56,12 @@
networking.firewall = {
enable = true;
allowedTCPPorts = [ 80 443 53 ];
allowedUDPPorts = [ 80 443 53 ];
allowedTCPPorts = [ 1080 1443 1053 ];
allowedUDPPorts = [ 1080 1443 1053 ];
};
networking.hosts = {
"127.0.0.1" = [ "tbmrs.nl" ];
};
users.users.deploy = {

View File

@ -23,7 +23,7 @@
applications.ssh.enable = true;
applications.thunderbird.enable = false;
applications.yazi.enable = true;
applications.zellij.enable = false;
applications.zellij.enable = true;
services.nextcloud-sync.enable = false;
services.podman.enable = true;
@ -42,6 +42,8 @@
};
home.packages = with pkgs; [
unstable.helix
lazygit
];
# Enable home-manager

View File

@ -17,18 +17,28 @@ in {
config = mkIf cfg.enable {
services.podman.containers.caddy = {
image = "ghcr.io/iarekylew00t/caddy-cloudflare:latest";
image = "localhost/tboomers/caddy-custom:latest";
ports = [
"1080:80"
"1443:8443"
"1443:443"
];
volumes = [
"/home/deploy/containers/caddy/Caddyfile:/etc/caddy/Caddyfile:Z"
"%h/containers/caddy/Caddyfile:/etc/caddy/Caddyfile"
"%h/containers/caddy/acme_key:/etc/caddy/acme_key"
"%h/containers/caddy/data:/data"
];
};
home.file."containers/caddy/Caddyfile".text = ''
http://localhost {
{
acme_dns transip xeovalyte /etc/caddy/acme_key
}
tbmrs.nl {
respond "Hello there"
}
http://tbmrs.nl {
respond "Hello there"
}
'';