dotfiles.nix/nixos/viridian/containers/mealie.nix

48 lines
1 KiB
Nix
Raw Normal View History

2024-08-08 09:02:42 +08:00
{...}: let
2024-06-16 23:08:01 +08:00
port = "9925";
2024-08-08 09:02:42 +08:00
in {
2024-06-16 23:08:01 +08:00
virtualisation.oci-containers.containers = {
mealie = {
autoStart = true;
2024-08-11 20:05:27 +08:00
image = "ghcr.io/mealie-recipes/mealie:v1.11.0";
2024-06-16 23:08:01 +08:00
ports = [
"${port}:9000"
];
volumes = [
"/srv/containers/mealie:/app/data/"
];
environment = {
ALLOW_SIGNUP = "false";
PUID = "1000";
PGID = "100";
TZ = "Australia/Perth";
MAX_WORKERS = "1";
WEB_CONCURRENCY = "1";
BASE_URL = "https://mealie.kanto.dev";
SECURITY_MAX_LOGIN_ATTEMPTS = "3";
SECRURITY_USER_LOCKOUT_TIME = "72";
2024-06-16 23:08:01 +08:00
};
};
};
services.traefik.dynamicConfigOptions.http.routers = {
mealie = {
2024-08-08 09:02:42 +08:00
rule = "Host(`mealie.kanto.dev`)";
2024-06-16 23:08:01 +08:00
entryPoints = [
"websecure"
];
middlewares = [
"crowdsec"
"geoblock"
2024-06-16 23:08:01 +08:00
];
service = "mealie";
};
};
services.traefik.dynamicConfigOptions.http.services = {
mealie.loadBalancer.servers = [
2024-08-08 09:02:42 +08:00
{url = "http://127.0.0.1:${port}";}
2024-06-16 23:08:01 +08:00
];
};
}