2025-01-15 18:19:03 +01:00
|
|
|
{config, ...}: {
|
|
|
|
virtualisation.oci-containers.containers."ghost" = {
|
2025-01-20 11:36:17 +01:00
|
|
|
image = "docker.io/ghost:5.106.1";
|
2025-01-15 18:19:03 +01:00
|
|
|
environmentFiles = [config.age.secrets.ghost-env.path];
|
2025-01-20 11:36:17 +01:00
|
|
|
ports = ["127.0.0.1:3002:2368"];
|
2025-01-15 18:19:03 +01:00
|
|
|
volumes = ["ghost_data:/var/lib/ghost/content"];
|
|
|
|
extraOptions = ["--add-host=mysql:10.89.0.1" "--ip=10.89.0.11" "--network=web"];
|
|
|
|
};
|
|
|
|
# Traefik configuration specific to ghost
|
|
|
|
services.traefik.dynamicConfigOptions.http = {
|
|
|
|
services.ghost.loadBalancer.servers = [
|
|
|
|
{
|
|
|
|
url = "http://localhost:3002/";
|
|
|
|
}
|
|
|
|
];
|
|
|
|
|
|
|
|
routers.ghost = {
|
|
|
|
rule = "Host(`www.m3tam3re.com`)";
|
|
|
|
tls = {
|
|
|
|
certResolver = "godaddy";
|
|
|
|
};
|
|
|
|
service = "ghost";
|
|
|
|
entrypoints = "websecure";
|
|
|
|
};
|
|
|
|
};
|
|
|
|
}
|