Revert "feat(docker): wrap within tini"

This reverts commit c86f36b2f6.
This commit is contained in:
Steffen Jost 2023-05-09 14:19:17 +00:00
parent 80c8a80bc2
commit 5dba0f0b62

View File

@ -1,4 +1,4 @@
# SPDX-FileCopyrightText: 2022-2023 Gregor Kleen <gregor@kleen.consulting>, Sarah Vaupel <sarah.vaupel@ifi.lmu.de>, Steffen Jost <jost@tcs.ifi.lmu.de> # SPDX-FileCopyrightText: 2022 Gregor Kleen <gregor.kleen@ifi.lmu.de>,Sarah Vaupel <sarah.vaupel@ifi.lmu.de>,Steffen Jost <jost@cip.ifi.lmu.de>,Steffen Jost <jost@tcs.ifi.lmu.de>
# #
# SPDX-License-Identifier: AGPL-3.0-or-later # SPDX-License-Identifier: AGPL-3.0-or-later
@ -22,27 +22,16 @@ let
in (builtins.fromJSON (prev.lib.readFile versionFile)).version; in (builtins.fromJSON (prev.lib.readFile versionFile)).version;
inherit created; inherit created;
copyToRoot = prev.buildEnv { contents = with final; [
name = "uniworx${optionalString isDemo "-demo"}-root";
paths = with final; [
uniworx.uniworx.components.exes.uniworx uniworx.uniworx.components.exes.uniworx
prev.dockerTools.binSh findutils coreutils prev.dockerTools.binSh findutils coreutils
iana-etc iana-etc
# just for manual testing within the pod, may be removed for production? # for PDF creation with Pandoc and LuaTeX
curl wget netcat openldap #cups # needed for interface with print center -- did not work as intended, requires lpd running
unixtools.netstat htop gnugrep busybox # should provide a working lpr -- to be tested
locale htop
] ++ optionals isDemo [ postgresql_12 memcached uniworx.uniworx.components.exes.uniworxdb ]; pdftk # for encrypting pdfs
#texlive.combined.scheme-medium # too large for container in LMU build environment.
nativeBuildInputs = with prev; [ makeWrapper ];
postBuild = ''
wrapProgram $out/bin/uniworx \
--set-default LOCALE_ARCHIVE ${final.glibcLocalesUtf8}/lib/locale/locale-archive \
--set-default LOCALE_ARCHIVE_2_27 ${final.glibcLocalesUtf8}/lib/locale/locale-archive \
--set-default LANG en_DK.UTF-8 \
--suffix PATH : ${makeBinPath (with final; [
busybox
pdftk
(texlive.combine { (texlive.combine {
inherit (texlive) scheme-basic inherit (texlive) scheme-basic
babel-german babel-english booktabs textpos babel-german babel-english booktabs textpos
@ -51,9 +40,11 @@ let
luatexbase lualatex-math unicode-math selnolig luatexbase lualatex-math unicode-math selnolig
; ;
}) })
])} # just for manual testing within the pod, may be removef for production?
''; curl wget netcat openldap
}; unixtools.netstat htop gnugrep
locale
] ++ optionals isDemo [ postgresql_12 memcached uniworx.uniworx.components.exes.uniworxdb ];
runAsRoot = '' runAsRoot = ''
#!${final.stdenv.shell} #!${final.stdenv.shell}
@ -143,7 +134,7 @@ let
approot: "_env:APPROOT:http://localhost:8080" approot: "_env:APPROOT:http://localhost:8080"
''; '';
in { in {
Cmd = [ "${final.tini}/bin/tini" "${entrypoint}/bin/uniworx-entrypoint" ]; Cmd = [ "${entrypoint}/bin/uniworx-entrypoint" ];
User = "uniworx:uniworx"; User = "uniworx:uniworx";
ExposedPorts = { ExposedPorts = {
"8080/tcp" = {}; "8080/tcp" = {};
@ -154,10 +145,6 @@ let
} // optionalAttrs isDemo { } // optionalAttrs isDemo {
"/var/lib/postgres" = {}; "/var/lib/postgres" = {};
}; };
Env = [
"TINI_SUBREAPER=yes"
"TINI_VERBOSITY=2"
];
}; };
}; };
in in
@ -168,14 +155,11 @@ in
tag = (builtins.fromJSON (prev.lib.readFile ./ci-version.json)).version; tag = (builtins.fromJSON (prev.lib.readFile ./ci-version.json)).version;
fromImage = prev.docker-nixpkgs.nix-unstable; fromImage = prev.docker-nixpkgs.nix-unstable;
copyToRoot = prev.buildEnv { contents = with final; [
name = "uniworx-ci-root";
paths = with final; [
bash coreutils bash coreutils
minio-client minio-client
xz xz
]; ];
};
runAsRoot = '' runAsRoot = ''
#!${final.stdenv.shell} #!${final.stdenv.shell}