about summary refs log tree commit diff stats
path: root/default.nix
diff options
context:
space:
mode:
authorAlan Pearce2024-06-24 17:18:27 +0200
committerAlan Pearce2024-06-24 17:18:27 +0200
commit50456c578497e9921558941eae59fa01bcf269bf (patch)
treec2520d354a789c50bffbf3bf961dc2a6e6b47659 /default.nix
parente6dd1b5f719ea483f5e77f78c045224607707d0a (diff)
downloadwebsite-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.nix9
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";
   };
 }