feat: update kitchenowl to use the beta all in one docker compose file
This commit is contained in:
parent
a48eb45a48
commit
2cb2e0fa71
3 changed files with 10 additions and 38 deletions
|
@ -23,6 +23,7 @@
|
||||||
container.kitchenowl = {
|
container.kitchenowl = {
|
||||||
enable = true;
|
enable = true;
|
||||||
openFirewall = true;
|
openFirewall = true;
|
||||||
|
version = "v0.5.2";
|
||||||
};
|
};
|
||||||
|
|
||||||
server = {
|
server = {
|
||||||
|
|
|
@ -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
|
||||||
|
|
|
@ -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 ];
|
||||||
|
|
Loading…
Add table
Reference in a new issue