Add attic

Signed-off-by: Nikolaos Karaolidis <nick@karaolidis.com>
This commit is contained in:
2025-09-03 15:03:30 +01:00
parent dd34a05ee8
commit 0ceab452be
24 changed files with 658 additions and 24 deletions

View File

@@ -6,6 +6,7 @@
darktable-lua-scripts = import ./darktable/lua-scripts { inherit pkgs; };
docker-image-adguardhome = import ./docker/adguardhome { inherit pkgs; };
docker-image-attic = import ./docker/attic { inherit pkgs; };
docker-image-authelia = import ./docker/authelia { inherit pkgs; };
docker-image-base = import ./docker/base { inherit pkgs; };
docker-image-comentario = import ./docker/comentario { inherit pkgs; };

View File

@@ -0,0 +1,34 @@
{ pkgs, ... }:
let
entrypoint = pkgs.writeTextFile {
name = "entrypoint";
executable = true;
destination = "/bin/entrypoint";
text = builtins.readFile ./entrypoint.sh;
};
in
pkgs.dockerTools.buildImage {
name = "attic";
fromImage = pkgs.docker-image-base;
copyToRoot = pkgs.buildEnv {
name = "root";
paths = with pkgs; [
entrypoint
attic-server
attic-client
];
pathsToLink = [ "/bin" ];
};
config = {
Entrypoint = [ "entrypoint" ];
ExposedPorts = {
"8080/tcp" = { };
};
WorkingDir = "/var/lib/atticd";
Volumes = {
"/var/lib/atticd" = { };
};
};
}

View File

@@ -0,0 +1,16 @@
#!/usr/bin/env sh
set -o errexit
set -o nounset
atticd "$@" &
PID=$!
if [ -f /etc/attic/post-start.sh ]; then
# shellcheck disable=SC1091
. /etc/attic/post-start.sh
fi
trap 'kill -KILL "$PID"' INT TERM
wait "$PID"
exit $?