diff options
author | Alan Pearce | 2024-06-24 17:18:27 +0200 |
---|---|---|
committer | Alan Pearce | 2024-06-24 17:18:27 +0200 |
commit | 50456c578497e9921558941eae59fa01bcf269bf (patch) | |
tree | c2520d354a789c50bffbf3bf961dc2a6e6b47659 /default.nix | |
parent | e6dd1b5f719ea483f5e77f78c045224607707d0a (diff) | |
download | website-50456c578497e9921558941eae59fa01bcf269bf.tar.lz website-50456c578497e9921558941eae59fa01bcf269bf.tar.zst website-50456c578497e9921558941eae59fa01bcf269bf.zip |
handle TLS in server with ACME
Diffstat (limited to 'default.nix')
-rw-r--r-- | default.nix | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/default.nix b/default.nix index 31f6b91..778f790 100644 --- a/default.nix +++ b/default.nix @@ -14,9 +14,13 @@ let runCommandLocal; version = "unstable"; - mkDocker = type: { server, website }: + mkDocker = type: { server, website, architecture ? pkgs.go.GOARCH }: pkgs.dockerTools.${type} { name = "registry.fly.io/alanpearce-eu"; + contents = with pkgs; [ + cacert + ]; + inherit architecture; config = { Cmd = [ "${server}/bin/server" ]; Env = [ @@ -28,6 +32,7 @@ let WorkingDir = website; ExposedPorts = { "80/tcp" = { }; + "443/tcp" = { }; }; }; }; @@ -130,9 +135,11 @@ rec { docker-image-amd64-linux = mkDockerImage { inherit website; server = server-amd64-linux; + architecture = "amd64"; }; docker-stream-amd64-linux = mkDockerStream { inherit website; server = server-amd64-linux; + architecture = "amd64"; }; } |