all repos — homestead @ 237a76fb2bdd27148927cdcf53312717b76ca81e

Code for my website

simplify docker build

Alan Pearce
commit

237a76fb2bdd27148927cdcf53312717b76ca81e

parent

6af00f8d87504a843e0957398ebbba6c0b44f035

2 files changed, 5 insertions(+), 10 deletions(-)

jump to
M default.nixdefault.nix
@@ -15,9 +15,6 @@ runCommandLocal;
version = "unstable"; mkDocker = type: { server, website }: - let - PORT = 80; - in pkgs.dockerTools.${type} { name = "registry.fly.io/alanpearce-eu"; config = {
@@ -25,11 +22,12 @@ Cmd = [ "${server}/bin/server" ];
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 @@ ];
}; } '' ${builder}/bin/build -s $src -d $out + cp $src/config.toml $out/ ''; server = buildGoApplication { pname = "server";
M fly.tomlfly.toml
@@ -14,10 +14,6 @@ BASE_URL = "https://alanpearce.eu"
PORT = "80" REDIRECT_OTHER_HOSTNAMES = "true" -[[files]] - guest_path = "/config.toml" - local_path = "config.toml" - [http_service] internal_port = 80 force_https = true