about summary refs log tree commit diff stats
diff options
context:
space:
mode:
-rw-r--r--default.nix11
-rw-r--r--fly.toml4
2 files changed, 5 insertions, 10 deletions
diff --git a/default.nix b/default.nix
index 4c29731..31f6b91 100644
--- a/default.nix
+++ b/default.nix
@@ -15,9 +15,6 @@ let
 
   version = "unstable";
   mkDocker = type: { server, website }:
-    let
-      PORT = 80;
-    in
     pkgs.dockerTools.${type} {
       name = "registry.fly.io/alanpearce-eu";
       config = {
@@ -25,11 +22,12 @@ let
         Env = [
           "PRODUCTION=true"
           "LISTEN_ADDRESS=::"
-          "PORT=${builtins.toString PORT}"
-          "ROOT=${website}"
+          "ROOT=."
+          "PORT=80"
         ];
+        WorkingDir = website;
         ExposedPorts = {
-          "${builtins.toString PORT}/tcp" = { };
+          "80/tcp" = { };
         };
       };
     };
@@ -90,6 +88,7 @@ rec {
       };
     } ''
     ${builder}/bin/build -s $src -d $out
+    cp $src/config.toml $out/
   '';
   server = buildGoApplication {
     pname = "server";
diff --git a/fly.toml b/fly.toml
index 4488c03..3487e95 100644
--- a/fly.toml
+++ b/fly.toml
@@ -14,10 +14,6 @@ primary_region = "ams"
   PORT = "80"
   REDIRECT_OTHER_HOSTNAMES = "true"
 
-[[files]]
-  guest_path = "/config.toml"
-  local_path = "config.toml"
-
 [http_service]
   internal_port = 80
   force_https = true