Remove init containers
Signed-off-by: Nikolaos Karaolidis <nick@karaolidis.com>
This commit is contained in:
@@ -159,38 +159,14 @@ in
|
||||
};
|
||||
|
||||
containers = {
|
||||
authelia-init = {
|
||||
containerConfig = {
|
||||
image = "docker-archive:${selfPkgs.docker-yq}";
|
||||
volumes =
|
||||
let
|
||||
entrypoint = pkgs.writeTextFile {
|
||||
name = "entrypoint.sh";
|
||||
executable = true;
|
||||
text = builtins.readFile ./init-entrypoint.sh;
|
||||
};
|
||||
in
|
||||
[
|
||||
"${volumes.authelia.ref}:/etc/authelia"
|
||||
"${hmConfig.sops.templates.authelia-users.path}:/etc/authelia/users.yaml.default:ro"
|
||||
"${hmConfig.sops.templates.authelia.path}:/etc/authelia/conf.d/authelia.yaml:ro"
|
||||
"${entrypoint}:/entrypoint.sh:ro"
|
||||
];
|
||||
entrypoint = "/entrypoint.sh";
|
||||
};
|
||||
|
||||
serviceConfig = {
|
||||
Type = "oneshot";
|
||||
Restart = "on-failure";
|
||||
};
|
||||
|
||||
unitConfig.After = [ "sops-nix.service" ];
|
||||
};
|
||||
|
||||
authelia = {
|
||||
containerConfig = {
|
||||
image = "docker-archive:${selfPkgs.docker-authelia}";
|
||||
volumes = [ "${volumes.authelia.ref}:/etc/authelia" ];
|
||||
volumes = [
|
||||
"${volumes.authelia.ref}:/etc/authelia"
|
||||
"${hmConfig.sops.templates.authelia-users.path}:/etc/authelia/users.yaml.default:ro"
|
||||
"${hmConfig.sops.templates.authelia.path}:/etc/authelia/conf.d/authelia.yaml:ro"
|
||||
];
|
||||
networks = [
|
||||
networks.authelia.ref
|
||||
networks.traefik.ref
|
||||
@@ -207,7 +183,6 @@ in
|
||||
};
|
||||
|
||||
unitConfig.After = [
|
||||
"${containers.authelia-init._serviceName}.service"
|
||||
"${containers.authelia-postgresql._serviceName}.service"
|
||||
"${containers.authelia-redis._serviceName}.service"
|
||||
"sops-nix.service"
|
||||
@@ -236,7 +211,7 @@ in
|
||||
exec = [ "--save 60 1" ];
|
||||
};
|
||||
|
||||
prometheus-init.containerConfig.volumes =
|
||||
prometheus.containerConfig.volumes =
|
||||
let
|
||||
autheliaConfig = (pkgs.formats.yaml { }).generate "authelia.yaml" {
|
||||
scrape_configs =
|
||||
|
@@ -1,10 +0,0 @@
|
||||
#!/bin/sh
|
||||
|
||||
set -o errexit
|
||||
set -o nounset
|
||||
|
||||
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
|
||||
# shellcheck disable=SC2016
|
||||
yq eval-all '. as $item ireduce ({}; . *+ $item)' /etc/authelia/conf.d/*.yaml > /etc/authelia/configuration.yaml
|
Reference in New Issue
Block a user