playbook base initial skeleton
This commit is contained in:
9
services/baserow/default.nix
Normal file
9
services/baserow/default.nix
Normal file
@ -0,0 +1,9 @@
|
||||
{
|
||||
virtualisation.oci-containers.containers.baserow = {
|
||||
image = "docker.io/baserow/baserow:latest";
|
||||
environmentFiles = ["/etc/environment-files/baserow.env"];
|
||||
ports = ["127.0.0.1:3000:80"];
|
||||
volumes = ["baserow_data:/baserow/data"];
|
||||
extraOptions = ["--network=web"];
|
||||
};
|
||||
}
|
3
services/caddy/default.nix
Normal file
3
services/caddy/default.nix
Normal file
@ -0,0 +1,3 @@
|
||||
{
|
||||
services.caddy.enable = true;
|
||||
}
|
28
services/core/default.nix
Normal file
28
services/core/default.nix
Normal file
@ -0,0 +1,28 @@
|
||||
{
|
||||
imports = [
|
||||
./baserow
|
||||
./n8n
|
||||
./portainer
|
||||
];
|
||||
|
||||
virtualisation.oci-containers.backend = "docker";
|
||||
|
||||
systemd.services.docker-network-web = {
|
||||
description = "Create Docker Network Web";
|
||||
requires = ["docker.service"];
|
||||
after = ["docker.service"];
|
||||
wantedBy = ["multi-user.target"];
|
||||
|
||||
# Run on startup if network doesn't exist
|
||||
serviceConfig = {
|
||||
Type = "oneshot";
|
||||
RemainAfterExit = true;
|
||||
};
|
||||
|
||||
script = ''
|
||||
if ! /run/current-system/sw/bin/docker network ls | grep -q 'web'; then
|
||||
/run/current-system/sw/bin/docker network create web
|
||||
fi
|
||||
'';
|
||||
};
|
||||
}
|
9
services/n8n/default.nix
Normal file
9
services/n8n/default.nix
Normal file
@ -0,0 +1,9 @@
|
||||
{
|
||||
virtualisation.oci-containers.containers.n8n = {
|
||||
image = "docker.io/n8nio/n8n:latest";
|
||||
environmentFiles = ["/etc/environment-files/n8n.env"];
|
||||
ports = ["127.0.0.1:5678:5678"];
|
||||
volumes = ["n8n_data:/home/node/.n8n"];
|
||||
extraOptions = ["--network=web"];
|
||||
};
|
||||
}
|
11
services/portainer/default.nix
Normal file
11
services/portainer/default.nix
Normal file
@ -0,0 +1,11 @@
|
||||
{
|
||||
virtualisation.oci-containers.containers.portainer = {
|
||||
image = "docker.io/portainer/portainer-ce:latest";
|
||||
ports = ["127.0.0.1:9000:9000"];
|
||||
volumes = [
|
||||
"/etc/localtime:/etc/localtime:ro"
|
||||
"/var/run/docker.sock:/var/run/docker.sock:ro"
|
||||
"portainer_data:/data"
|
||||
];
|
||||
};
|
||||
}
|
Reference in New Issue
Block a user