2025-02-23 19:07:14 +01:00
|
|
|
{config, ...}: {
|
|
|
|
virtualisation.oci-containers.containers."n8n" = {
|
|
|
|
image = "docker.n8n.io/n8nio/n8n";
|
|
|
|
environmentFiles = [config.age.secrets.n8n-env.path];
|
|
|
|
ports = ["127.0.0.1:5678:5678"];
|
|
|
|
volumes = ["n8n_data:/home/node/.n8n"];
|
|
|
|
extraOptions = ["--add-host=postgres:10.89.0.1" "--ip=10.89.0.14" "--network=web"];
|
2025-02-20 15:47:16 +01:00
|
|
|
};
|
|
|
|
|
2025-02-14 09:32:40 +01:00
|
|
|
# Traefik configuration specific to n8n
|
|
|
|
services.traefik.dynamicConfigOptions.http = {
|
|
|
|
services.n8n.loadBalancer.servers = [
|
|
|
|
{
|
|
|
|
url = "http://localhost:5678/";
|
|
|
|
}
|
|
|
|
];
|
|
|
|
|
2025-02-14 13:44:29 +01:00
|
|
|
routers.n8n = {
|
2025-02-14 09:32:40 +01:00
|
|
|
rule = "Host(`wf.m3tam3re.com`)";
|
|
|
|
tls = {
|
|
|
|
certResolver = "godaddy";
|
|
|
|
};
|
|
|
|
service = "n8n";
|
|
|
|
entrypoints = "websecure";
|
|
|
|
};
|
|
|
|
};
|
|
|
|
}
|