feature: Adds base Traefik stack
This commit is contained in:
parent
8a2f7309ec
commit
efe245787a
4 changed files with 76 additions and 0 deletions
39
hosts/andromeda/stacks/traefik/docker-compose.nix
Normal file
39
hosts/andromeda/stacks/traefik/docker-compose.nix
Normal file
|
@ -0,0 +1,39 @@
|
|||
# Auto-generated using compose2nix v0.3.1.
|
||||
{ pkgs, lib, ... }:
|
||||
|
||||
{
|
||||
# Containers
|
||||
virtualisation.oci-containers.containers."traefik-reverse-proxy" = {
|
||||
image = "traefik:v3.3";
|
||||
volumes = [
|
||||
"/var/run/docker.sock:/var/run/docker.sock:rw"
|
||||
];
|
||||
cmd = [ "--api.insecure=true" "--entryPoints.web.address=:8000" "--providers.docker" ];
|
||||
log-driver = "journald";
|
||||
extraOptions = [
|
||||
"--network=host"
|
||||
];
|
||||
};
|
||||
|
||||
systemd.services."docker-traefik-reverse-proxy" = {
|
||||
serviceConfig = {
|
||||
Restart = lib.mkOverride 90 "no";
|
||||
};
|
||||
partOf = [
|
||||
"docker-compose-traefik-root.target"
|
||||
];
|
||||
wantedBy = [
|
||||
"docker-compose-traefik-root.target"
|
||||
];
|
||||
};
|
||||
|
||||
# Root service
|
||||
# When started, this will automatically create all resources and start
|
||||
# the containers. When stopped, this will teardown all resources.
|
||||
systemd.targets."docker-compose-traefik-root" = {
|
||||
unitConfig = {
|
||||
Description = "Root target generated by compose2nix.";
|
||||
};
|
||||
wantedBy = [ "multi-user.target" ];
|
||||
};
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue