feat: update kitchenowl to use the beta all in one docker compose file

This commit is contained in:
Nydragon 2024-10-02 19:05:33 +02:00
parent a48eb45a48
commit 2cb2e0fa71
Signed by: nydragon
SSH key fingerprint: SHA256:iQnIC12spf4QjWSbarmkD2No1cLMlu6TWoV7K6cYF5g
3 changed files with 10 additions and 38 deletions

View file

@ -23,6 +23,7 @@
container.kitchenowl = { container.kitchenowl = {
enable = true; enable = true;
openFirewall = true; openFirewall = true;
version = "v0.5.2";
}; };
server = { server = {

View file

@ -12,7 +12,6 @@ lib.mkIf config.programs.sway.enable {
grim grim
slurp slurp
wl-clipboard wl-clipboard
swaynotificationcenter
swaybg swaybg
swaylock swaylock
swayidle swayidle

View file

@ -6,7 +6,7 @@
}: }:
let let
inherit (lib) mkIf mkOption mkEnableOption; inherit (lib) mkIf mkOption mkEnableOption;
inherit (lib.types) port bool; inherit (lib.types) port bool string;
cfg = config.modules.container.kitchenowl; cfg = config.modules.container.kitchenowl;
in in
{ {
@ -20,6 +20,10 @@ in
type = bool; type = bool;
default = false; default = false;
}; };
version = mkOption {
type = string;
default = "latest";
};
}; };
config = mkIf cfg.enable { config = mkIf cfg.enable {
@ -27,37 +31,23 @@ in
networking.firewall.allowedTCPPorts = mkIf cfg.openFirewall [ cfg.port ]; networking.firewall.allowedTCPPorts = mkIf cfg.openFirewall [ cfg.port ];
# Containers
virtualisation.oci-containers.containers."kitchenowl-back" = { virtualisation.oci-containers.containers."kitchenowl-back" = {
image = "tombursch/kitchenowl:latest"; image = "tombursch/kitchenowl:${toString cfg.version}";
environment = { environment = {
"JWT_SECRET_KEY" = "PLEASE_CHANGE_ME"; "JWT_SECRET_KEY" = "PLEASE_CHANGE_ME";
}; };
volumes = [ volumes = [
"kitchenowl_kitchenowl_data:/data:rw" "kitchenowl_kitchenowl_data:/data:rw"
]; ];
ports = [
"${toString cfg.port}:8080/tcp"
];
log-driver = "journald"; log-driver = "journald";
extraOptions = [ extraOptions = [
"--network-alias=back" "--network-alias=back"
"--network=kitchenowl_default" "--network=kitchenowl_default"
]; ];
}; };
virtualisation.oci-containers.containers."kitchenowl-front" = {
image = "tombursch/kitchenowl-web:latest";
ports = [
"${toString cfg.port}:80/tcp"
];
dependsOn = [
"kitchenowl-back"
];
log-driver = "journald";
extraOptions = [
"--hostname=kitchenowl"
"--network-alias=front"
"--network=kitchenowl_default"
];
};
systemd.services."podman-kitchenowl-back" = { systemd.services."podman-kitchenowl-back" = {
serviceConfig = { serviceConfig = {
Restart = lib.mkOverride 500 "always"; Restart = lib.mkOverride 500 "always";
@ -78,24 +68,6 @@ in
]; ];
}; };
systemd.services."podman-kitchenowl-front" = {
serviceConfig = {
Restart = lib.mkOverride 500 "always";
};
after = [
"podman-network-kitchenowl_default.service"
];
requires = [
"podman-network-kitchenowl_default.service"
];
partOf = [
"podman-compose-kitchenowl-root.target"
];
wantedBy = [
"podman-compose-kitchenowl-root.target"
];
};
# Networks # Networks
systemd.services."podman-network-kitchenowl_default" = { systemd.services."podman-network-kitchenowl_default" = {
path = [ pkgs.podman ]; path = [ pkgs.podman ];