Revert "feat(docker): wrap within tini"
This reverts commit c86f36b2f6.
This commit is contained in:
parent
80c8a80bc2
commit
5dba0f0b62
@ -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
|
||||||
|
|
||||||
@ -13,47 +13,38 @@ let
|
|||||||
printf '%s' $(date -Is -d '@${toString self.lastModified}') > $out
|
printf '%s' $(date -Is -d '@${toString self.lastModified}') > $out
|
||||||
'');
|
'');
|
||||||
in if self ? lastModified then fromDate else "1970-01-01T00:00:01Z";
|
in if self ? lastModified then fromDate else "1970-01-01T00:00:01Z";
|
||||||
|
|
||||||
mkUniworxDocker = { isDemo }: prev.dockerTools.buildImage {
|
mkUniworxDocker = { isDemo }: prev.dockerTools.buildImage {
|
||||||
name = "uniworx${optionalString isDemo "-demo"}";
|
name = "uniworx${optionalString isDemo "-demo"}";
|
||||||
tag =
|
tag =
|
||||||
let
|
let
|
||||||
versionFile = if isDemo then ./demo-version.json else ./version.json;
|
versionFile = if isDemo then ./demo-version.json else ./version.json;
|
||||||
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";
|
uniworx.uniworx.components.exes.uniworx
|
||||||
paths = with final; [
|
prev.dockerTools.binSh findutils coreutils
|
||||||
uniworx.uniworx.components.exes.uniworx
|
iana-etc
|
||||||
prev.dockerTools.binSh findutils coreutils
|
# for PDF creation with Pandoc and LuaTeX
|
||||||
iana-etc
|
#cups # needed for interface with print center -- did not work as intended, requires lpd running
|
||||||
# just for manual testing within the pod, may be removed for production?
|
busybox # should provide a working lpr -- to be tested
|
||||||
curl wget netcat openldap
|
htop
|
||||||
unixtools.netstat htop gnugrep
|
pdftk # for encrypting pdfs
|
||||||
locale
|
#texlive.combined.scheme-medium # too large for container in LMU build environment.
|
||||||
] ++ optionals isDemo [ postgresql_12 memcached uniworx.uniworx.components.exes.uniworxdb ];
|
(texlive.combine {
|
||||||
|
inherit (texlive) scheme-basic
|
||||||
nativeBuildInputs = with prev; [ makeWrapper ];
|
babel-german babel-english booktabs textpos
|
||||||
postBuild = ''
|
enumitem eurosym koma-script parskip xcolor dejavu
|
||||||
wrapProgram $out/bin/uniworx \
|
# required fro LuaTeX
|
||||||
--set-default LOCALE_ARCHIVE ${final.glibcLocalesUtf8}/lib/locale/locale-archive \
|
luatexbase lualatex-math unicode-math selnolig
|
||||||
--set-default LOCALE_ARCHIVE_2_27 ${final.glibcLocalesUtf8}/lib/locale/locale-archive \
|
;
|
||||||
--set-default LANG en_DK.UTF-8 \
|
})
|
||||||
--suffix PATH : ${makeBinPath (with final; [
|
# just for manual testing within the pod, may be removef for production?
|
||||||
busybox
|
curl wget netcat openldap
|
||||||
pdftk
|
unixtools.netstat htop gnugrep
|
||||||
(texlive.combine {
|
locale
|
||||||
inherit (texlive) scheme-basic
|
] ++ optionals isDemo [ postgresql_12 memcached uniworx.uniworx.components.exes.uniworxdb ];
|
||||||
babel-german babel-english booktabs textpos
|
|
||||||
enumitem eurosym koma-script parskip xcolor dejavu
|
|
||||||
# required fro LuaTeX
|
|
||||||
luatexbase lualatex-math unicode-math selnolig
|
|
||||||
;
|
|
||||||
})
|
|
||||||
])}
|
|
||||||
'';
|
|
||||||
};
|
|
||||||
|
|
||||||
runAsRoot = ''
|
runAsRoot = ''
|
||||||
#!${final.stdenv.shell}
|
#!${final.stdenv.shell}
|
||||||
@ -70,7 +61,7 @@ let
|
|||||||
install -d -g uniworx -o uniworx -m 0755 /var/log/uniworx
|
install -d -g uniworx -o uniworx -m 0755 /var/log/uniworx
|
||||||
|
|
||||||
# just to see how to create directories here
|
# just to see how to create directories here
|
||||||
mkdir -p /testdir
|
mkdir -p /testdir
|
||||||
|
|
||||||
${optionalString isDemo ''
|
${optionalString isDemo ''
|
||||||
install -d -g uniworx -o uniworx -m 0750 /var/lib/postgres
|
install -d -g uniworx -o uniworx -m 0750 /var/lib/postgres
|
||||||
@ -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,15 +155,12 @@ 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";
|
bash coreutils
|
||||||
paths = with final; [
|
minio-client
|
||||||
bash coreutils
|
xz
|
||||||
minio-client
|
];
|
||||||
xz
|
|
||||||
];
|
|
||||||
};
|
|
||||||
|
|
||||||
runAsRoot = ''
|
runAsRoot = ''
|
||||||
#!${final.stdenv.shell}
|
#!${final.stdenv.shell}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user