Eliminate the shell from the docker image.
Some checks failed
build-staging Build build-staging has failed
Some checks failed
build-staging Build build-staging has failed
This commit is contained in:
34
flake.nix
34
flake.nix
@@ -63,20 +63,28 @@
|
||||
inherit system overlays;
|
||||
};
|
||||
appliedOverlay = self.overlays.default pkgs pkgs;
|
||||
nginx_conf = pkgs.replaceVars "${./docker/server/nginx.conf}" {
|
||||
web_root = appliedOverlay.homepage.release;
|
||||
mime_types = "${pkgs.nginx}/conf/mime.types";
|
||||
headers_include = "${./docker/server/headers.include}";
|
||||
};
|
||||
in
|
||||
rec {
|
||||
default = release;
|
||||
inherit (appliedOverlay.homepage)
|
||||
release
|
||||
;
|
||||
docker_env = pkgs.buildEnv {
|
||||
name = "homepage";
|
||||
paths = with pkgs; [
|
||||
appliedOverlay.homepage.launch_nginx
|
||||
# bash
|
||||
# uutils-coreutils-noprefix
|
||||
# toybox # Smaller than uutils-coreutils?
|
||||
];
|
||||
docker_env = pkgs.stdenv.mkDerivation {
|
||||
pname = "homepage-docker-env";
|
||||
version = "0.0.0";
|
||||
|
||||
dontUnpack = true;
|
||||
|
||||
installPhase = ''
|
||||
mkdir -p $out
|
||||
cp ${nginx_conf} $out/nginx.conf
|
||||
ln -sf ${pkgs.nginx}/bin/nginx $out/nginx
|
||||
'';
|
||||
};
|
||||
}
|
||||
);
|
||||
@@ -97,17 +105,9 @@
|
||||
organic_ast_explorer = organic_ast_explorer';
|
||||
inherit homepage_private;
|
||||
};
|
||||
nginx_conf = final.replaceVars "${./docker/server/nginx.conf}" {
|
||||
web_root = release;
|
||||
mime_types = "${final.nginx}/conf/mime.types";
|
||||
headers_include = "${./docker/server/headers.include}";
|
||||
};
|
||||
launch_nginx = final.writeShellScriptBin "launch_nginx" ''
|
||||
${final.nginx}/bin/nginx -c ${nginx_conf} -e stderr -g "daemon off;"
|
||||
'';
|
||||
in
|
||||
{
|
||||
inherit release launch_nginx;
|
||||
inherit release;
|
||||
}
|
||||
);
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user