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 = {
enable = true;
openFirewall = true;
version = "v0.5.2";
};
server = {

View file

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

View file

@ -6,7 +6,7 @@
}:
let
inherit (lib) mkIf mkOption mkEnableOption;
inherit (lib.types) port bool;
inherit (lib.types) port bool string;
cfg = config.modules.container.kitchenowl;
in
{
@ -20,6 +20,10 @@ in
type = bool;
default = false;
};
version = mkOption {
type = string;
default = "latest";
};
};
config = mkIf cfg.enable {
@ -27,37 +31,23 @@ in
networking.firewall.allowedTCPPorts = mkIf cfg.openFirewall [ cfg.port ];
# Containers
virtualisation.oci-containers.containers."kitchenowl-back" = {
image = "tombursch/kitchenowl:latest";
image = "tombursch/kitchenowl:${toString cfg.version}";
environment = {
"JWT_SECRET_KEY" = "PLEASE_CHANGE_ME";
};
volumes = [
"kitchenowl_kitchenowl_data:/data:rw"
];
ports = [
"${toString cfg.port}:8080/tcp"
];
log-driver = "journald";
extraOptions = [
"--network-alias=back"
"--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" = {
serviceConfig = {
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
systemd.services."podman-network-kitchenowl_default" = {
path = [ pkgs.podman ];