Add authelia base

Signed-off-by: Nikolaos Karaolidis <nick@karaolidis.com>
This commit is contained in:
2025-03-08 00:35:15 +00:00
parent 881b18065a
commit e9ffd4d839
8 changed files with 250 additions and 0 deletions

View File

@@ -0,0 +1,4 @@
{ pkgs, ... }:
{
docker = import ./docker { inherit pkgs; };
}

View File

@@ -0,0 +1,4 @@
{ pkgs, ... }:
{
postgres = import ./postgres { inherit pkgs; };
}

View File

@@ -0,0 +1,6 @@
{ pkgs, ... }:
pkgs.writeTextFile {
name = "log-wrapper-docker-postgres";
text = builtins.readFile ./wrapper.sh;
executable = true;
}

View File

@@ -0,0 +1,17 @@
#!/bin/sh
set -o errexit
set -o nounset
LOG_PIPE="$(mktemp -u)"
mkfifo "$LOG_PIPE"
while IFS= read -r line; do
if echo "$line" | grep -qE "ERROR|FATAL|PANIC"; then
echo "$line" >&2
else
echo "$line" >&1
fi
done < "$LOG_PIPE" &
exec /usr/local/bin/docker-entrypoint.sh "$@" >"$LOG_PIPE" 2>&1