Remove init containers
Signed-off-by: Nikolaos Karaolidis <nick@karaolidis.com>
This commit is contained in:
@@ -39,7 +39,6 @@
|
||||
docker-traefik = import ./docker/traefik { inherit pkgs; };
|
||||
docker-transmission-protonvpn = import ./docker/transmission-protonvpn { inherit pkgs; };
|
||||
docker-whoami = import ./docker/whoami { inherit pkgs; };
|
||||
docker-yq = import ./docker/yq { inherit pkgs; };
|
||||
|
||||
jellyfin-plugin-bookshelf = import ./jellyfin/plugins/bookshelf { inherit pkgs; };
|
||||
jellyfin-plugin-intro-skipper = import ./jellyfin/plugins/intro-skipper { inherit pkgs; };
|
||||
|
@@ -1,20 +1,28 @@
|
||||
{ pkgs, ... }:
|
||||
let
|
||||
entrypoint = pkgs.writeTextFile {
|
||||
name = "entrypoint";
|
||||
executable = true;
|
||||
destination = "/bin/entrypoint";
|
||||
text = builtins.readFile ./entrypoint.sh;
|
||||
};
|
||||
in
|
||||
pkgs.dockerTools.buildImage {
|
||||
name = "authelia";
|
||||
fromImage = import ../base { inherit pkgs; };
|
||||
|
||||
copyToRoot = pkgs.buildEnv {
|
||||
name = "root";
|
||||
paths = with pkgs; [ authelia ];
|
||||
paths = with pkgs; [
|
||||
entrypoint
|
||||
authelia
|
||||
yq-go
|
||||
];
|
||||
pathsToLink = [ "/bin" ];
|
||||
};
|
||||
|
||||
config = {
|
||||
Entrypoint = [ "authelia" ];
|
||||
Cmd = [
|
||||
"--config"
|
||||
"/etc/authelia/configuration.yaml"
|
||||
];
|
||||
Entrypoint = [ "entrypoint" ];
|
||||
ExposedPorts = {
|
||||
"9091/tcp" = { };
|
||||
};
|
||||
|
19
packages/docker/authelia/entrypoint.sh
Normal file
19
packages/docker/authelia/entrypoint.sh
Normal file
@@ -0,0 +1,19 @@
|
||||
#!/usr/bin/env sh
|
||||
|
||||
set -o errexit
|
||||
set -o nounset
|
||||
|
||||
if [ -f /etc/authelia/users.yaml.default ]; then
|
||||
touch /etc/authelia/users.yaml
|
||||
# shellcheck disable=SC2016
|
||||
yq eval-all '. as $item ireduce ({}; . * $item)' /etc/authelia/users.yaml /etc/authelia/users.yaml.default -i
|
||||
fi
|
||||
|
||||
if [ -d /etc/authelia/conf.d ]; then
|
||||
# shellcheck disable=SC2016
|
||||
yq eval-all '. as $item ireduce ({}; . *+ $item)' /etc/authelia/conf.d/*.yaml > /etc/authelia/configuration.yaml
|
||||
fi
|
||||
|
||||
exec authelia \
|
||||
--config /etc/authelia/configuration.yaml \
|
||||
"$@"
|
@@ -1,21 +1,34 @@
|
||||
{ pkgs, ... }:
|
||||
let
|
||||
entrypoint = pkgs.writeTextFile {
|
||||
name = "entrypoint";
|
||||
executable = true;
|
||||
destination = "/bin/entrypoint";
|
||||
text = builtins.readFile ./entrypoint.sh;
|
||||
};
|
||||
in
|
||||
pkgs.dockerTools.buildImage {
|
||||
name = "prometheus";
|
||||
fromImage = import ../base { inherit pkgs; };
|
||||
|
||||
copyToRoot = pkgs.buildEnv {
|
||||
name = "root";
|
||||
paths = with pkgs; [ prometheus ];
|
||||
paths = with pkgs; [
|
||||
entrypoint
|
||||
prometheus
|
||||
yq-go
|
||||
];
|
||||
pathsToLink = [ "/bin" ];
|
||||
};
|
||||
|
||||
config = {
|
||||
Entrypoint = [ "prometheus" ];
|
||||
Entrypoint = [ "entrypoint" ];
|
||||
ExposedPorts = {
|
||||
"9090/tcp" = { };
|
||||
};
|
||||
WorkingDir = "/var/lib/prometheus";
|
||||
Volumes = {
|
||||
"/etc/prometheus" = { };
|
||||
"/var/lib/prometheus" = { };
|
||||
};
|
||||
};
|
||||
|
14
packages/docker/prometheus/entrypoint.sh
Normal file
14
packages/docker/prometheus/entrypoint.sh
Normal file
@@ -0,0 +1,14 @@
|
||||
#!/usr/bin/env sh
|
||||
|
||||
set -o errexit
|
||||
set -o nounset
|
||||
|
||||
if [ -d /etc/prometheus/conf.d ]; then
|
||||
# shellcheck disable=SC2016
|
||||
yq eval-all '. as $item ireduce ({}; . *+ $item)' /etc/prometheus/conf.d/*.yaml > /etc/prometheus/prometheus.yaml
|
||||
fi
|
||||
|
||||
exec prometheus \
|
||||
--config.file=/etc/prometheus/prometheus.yaml \
|
||||
--storage.tsdb.path=/var/lib/prometheus \
|
||||
"$@"
|
@@ -1,15 +0,0 @@
|
||||
{ pkgs, ... }:
|
||||
pkgs.dockerTools.buildImage {
|
||||
name = "yq";
|
||||
fromImage = import ../base { inherit pkgs; };
|
||||
|
||||
copyToRoot = pkgs.buildEnv {
|
||||
name = "root";
|
||||
paths = with pkgs; [ yq-go ];
|
||||
pathsToLink = [ "/bin" ];
|
||||
};
|
||||
|
||||
config = {
|
||||
Entrypoint = [ "yq" ];
|
||||
};
|
||||
}
|
Reference in New Issue
Block a user