setup vars for jeevesjr

This commit is contained in:
Richie Cahill 2024-07-05 13:39:30 -04:00
parent 3f5179c194
commit a7362dcaba
3 changed files with 17 additions and 14 deletions

View File

@ -1,11 +0,0 @@
let
zfs_main = "/ZFS/Main";
in
{
inherit zfs_main;
# main
main_docker = "${zfs_main}/docker";
main_docker_configs = "${zfs_main}/docker/configs";
main_docker_templates = "${zfs_main}/docker/templates";
main_mirror = "${zfs_main}/mirror";
}

View File

@ -1,9 +1,12 @@
let
vars = import ../vars.nix;
in
{ {
virtualisation.oci-containers.containers = { virtualisation.oci-containers.containers = {
arch_mirror = { arch_mirror = {
image = "ubuntu/apache2:latest"; image = "ubuntu/apache2:latest";
volumes = [ volumes = [
"/ZFS/Main/Docker/templates/file_server/sites/:/etc/apache2/sites-enabled/" "${vars.main_docker_templates}/file_server/sites/:/etc/apache2/sites-enabled/"
"/ZFS/Main/Mirror/:/data" "/ZFS/Main/Mirror/:/data"
]; ];
ports = [ "800:80" ]; ports = [ "800:80" ];
@ -17,7 +20,7 @@
TZ = "Etc/EST"; TZ = "Etc/EST";
}; };
volumes = [ volumes = [
"/ZFS/Main/Docker/jeeves-jr/haproxy/cloudflare.pem:/etc/ssl/certs/cloudflare.pem" "${vars.main_docker}/jeeves-jr/haproxy/cloudflare.pem:/etc/ssl/certs/cloudflare.pem"
"${./haproxy.cfg}:/usr/local/etc/haproxy/haproxy.cfg" "${./haproxy.cfg}:/usr/local/etc/haproxy/haproxy.cfg"
]; ];
dependsOn = [ "arch_mirror" ]; dependsOn = [ "arch_mirror" ];
@ -30,7 +33,7 @@
"tunnel" "tunnel"
"run" "run"
]; ];
environmentFiles = [ "/ZFS/Main/Docker/jeeves-jr/cloudflare_tunnel.env" ]; environmentFiles = [ "${vars.main_docker}/jeeves-jr/cloudflare_tunnel.env" ];
dependsOn = [ "haproxy" ]; dependsOn = [ "haproxy" ];
extraOptions = [ "--network=web" ]; extraOptions = [ "--network=web" ];
autoStart = true; autoStart = true;

View File

@ -0,0 +1,11 @@
let
zfs_main = "/ZFS/Main";
in
{
inherit zfs_main;
# main
main_docker = "${zfs_main}/Docker";
main_docker_configs = "${zfs_main}/Docker/configs";
main_docker_templates = "${zfs_main}/Docker/templates";
main_mirror = "${zfs_main}/Mirror";
}