Services: Restructure f10, f11, heidi
This commit is contained in:
@ -3,29 +3,33 @@
|
|||||||
lib,
|
lib,
|
||||||
pkgs,
|
pkgs,
|
||||||
...
|
...
|
||||||
}: {
|
}: let
|
||||||
virtualisation.oci-containers.containers.formula10 = {
|
f10Version = "latest";
|
||||||
image = "gitea.vps.chriphost.de/christoph/formula10:latest";
|
in {
|
||||||
autoStart = true;
|
virtualisation.oci-containers.containers = {
|
||||||
|
formula10 = {
|
||||||
|
image = "gitea.vps.chriphost.de/christoph/formula10:${f10Version}";
|
||||||
|
autoStart = true;
|
||||||
|
|
||||||
dependsOn = [];
|
dependsOn = [];
|
||||||
|
|
||||||
ports = [
|
ports = [
|
||||||
"55555:5000"
|
"55555:5000"
|
||||||
];
|
];
|
||||||
|
|
||||||
volumes = [
|
volumes = [
|
||||||
"formula10_data:/app/instance"
|
"formula10_data:/app/instance"
|
||||||
"formula10_cache:/cache"
|
"formula10_cache:/cache"
|
||||||
];
|
];
|
||||||
|
|
||||||
environment = {
|
environment = {
|
||||||
TZ = "Europe/Berlin";
|
TZ = "Europe/Berlin";
|
||||||
|
};
|
||||||
|
|
||||||
|
extraOptions = [
|
||||||
|
"--init" # Make an init process take up PID 1, to make python receive the SIGTERM
|
||||||
|
"--net=behind-nginx"
|
||||||
|
];
|
||||||
};
|
};
|
||||||
|
|
||||||
extraOptions = [
|
|
||||||
"--init" # Make an init process take up PID 1, to make python receive the SIGTERM
|
|
||||||
"--net=behind-nginx"
|
|
||||||
];
|
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
@ -3,61 +3,66 @@
|
|||||||
lib,
|
lib,
|
||||||
pkgs,
|
pkgs,
|
||||||
...
|
...
|
||||||
}: {
|
}: let
|
||||||
virtualisation.oci-containers.containers.formula11_pocketbase = {
|
pocketbaseVersion = "0.25.0";
|
||||||
image = "gitea.vps.chriphost.de/christoph/pocketbase:0.25.0";
|
f11Version = "latest";
|
||||||
autoStart = true;
|
in {
|
||||||
|
virtualisation.oci-containers.containers = {
|
||||||
|
formula11_pocketbase = {
|
||||||
|
image = "gitea.vps.chriphost.de/christoph/pocketbase:${pocketbaseVersion}";
|
||||||
|
autoStart = true;
|
||||||
|
|
||||||
dependsOn = [
|
dependsOn = [
|
||||||
# "pihole"
|
# "pihole"
|
||||||
];
|
];
|
||||||
|
|
||||||
ports = [
|
ports = [
|
||||||
"8090:8080"
|
"8090:8080"
|
||||||
];
|
];
|
||||||
|
|
||||||
volumes = [
|
volumes = [
|
||||||
"formula11_pb_data:/pb/pb_data"
|
"formula11_pb_data:/pb/pb_data"
|
||||||
];
|
];
|
||||||
|
|
||||||
environment = {};
|
environment = {};
|
||||||
|
|
||||||
extraOptions = [
|
extraOptions = [
|
||||||
"--net=behind-nginx"
|
"--net=behind-nginx"
|
||||||
];
|
];
|
||||||
};
|
|
||||||
|
|
||||||
virtualisation.oci-containers.containers.formula11 = {
|
|
||||||
image = "gitea.vps.chriphost.de/christoph/formula11:latest";
|
|
||||||
autoStart = true;
|
|
||||||
|
|
||||||
dependsOn = [
|
|
||||||
"formula11_pocketbase"
|
|
||||||
];
|
|
||||||
|
|
||||||
ports = [
|
|
||||||
# "8080:8090"
|
|
||||||
"5173:3000"
|
|
||||||
];
|
|
||||||
|
|
||||||
volumes = [];
|
|
||||||
|
|
||||||
environment = {
|
|
||||||
# PB_PROTOCOL="http";
|
|
||||||
# PB_HOST="formula11_pocketbase";
|
|
||||||
# PB_PORT="8000";
|
|
||||||
|
|
||||||
# PB_PROTOCOL="https";
|
|
||||||
# PB_URL="f11pb.vps.chriphost.de";
|
|
||||||
|
|
||||||
PUBLIC_PBURL = "https://f11pb.vps.chriphost.de";
|
|
||||||
|
|
||||||
# Required by SvelteKit to prevent cross-site POST errors
|
|
||||||
ORIGIN = "https://f11.vps.chriphost.de";
|
|
||||||
};
|
};
|
||||||
|
|
||||||
extraOptions = [
|
formula11 = {
|
||||||
"--net=behind-nginx"
|
image = "gitea.vps.chriphost.de/christoph/formula11:${f11Version}";
|
||||||
];
|
autoStart = true;
|
||||||
|
|
||||||
|
dependsOn = [
|
||||||
|
"formula11_pocketbase"
|
||||||
|
];
|
||||||
|
|
||||||
|
ports = [
|
||||||
|
# "8080:8090"
|
||||||
|
"5173:3000"
|
||||||
|
];
|
||||||
|
|
||||||
|
volumes = [];
|
||||||
|
|
||||||
|
environment = {
|
||||||
|
# PB_PROTOCOL="http";
|
||||||
|
# PB_HOST="formula11_pocketbase";
|
||||||
|
# PB_PORT="8000";
|
||||||
|
|
||||||
|
# PB_PROTOCOL="https";
|
||||||
|
# PB_URL="f11pb.vps.chriphost.de";
|
||||||
|
|
||||||
|
PUBLIC_PBURL = "https://f11pb.vps.chriphost.de";
|
||||||
|
|
||||||
|
# Required by SvelteKit to prevent cross-site POST errors
|
||||||
|
ORIGIN = "https://f11.vps.chriphost.de";
|
||||||
|
};
|
||||||
|
|
||||||
|
extraOptions = [
|
||||||
|
"--net=behind-nginx"
|
||||||
|
];
|
||||||
|
};
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
@ -3,37 +3,41 @@
|
|||||||
lib,
|
lib,
|
||||||
pkgs,
|
pkgs,
|
||||||
...
|
...
|
||||||
}: {
|
}: let
|
||||||
|
heidiVersion = "latest";
|
||||||
|
in {
|
||||||
# If we need to pass secrets to containers we can't use plain env variables.
|
# If we need to pass secrets to containers we can't use plain env variables.
|
||||||
sops.templates."heidi_secrets.env".content = ''
|
sops.templates."heidi_secrets.env".content = ''
|
||||||
DISCORD_TOKEN=${config.sops.placeholder.heidi-discord-token}
|
DISCORD_TOKEN=${config.sops.placeholder.heidi-discord-token}
|
||||||
'';
|
'';
|
||||||
|
|
||||||
virtualisation.oci-containers.containers.heidi = {
|
virtualisation.oci-containers.containers = {
|
||||||
image = "gitea.vps.chriphost.de/christoph/discord-heidi:latest";
|
heidi = {
|
||||||
autoStart = true;
|
image = "gitea.vps.chriphost.de/christoph/discord-heidi:${heidiVersion}";
|
||||||
|
autoStart = true;
|
||||||
|
|
||||||
dependsOn = [];
|
dependsOn = [];
|
||||||
|
|
||||||
ports = [];
|
ports = [];
|
||||||
|
|
||||||
volumes = [
|
volumes = [
|
||||||
"heidi_config:/config"
|
"heidi_config:/config"
|
||||||
|
|
||||||
"/home/christoph/heidi-sounds:/sounds:ro"
|
"/home/christoph/heidi-sounds:/sounds:ro"
|
||||||
];
|
];
|
||||||
|
|
||||||
environment = {
|
environment = {
|
||||||
DOCKER = "True";
|
DOCKER = "True";
|
||||||
|
};
|
||||||
|
|
||||||
|
environmentFiles = [
|
||||||
|
config.sops.templates."heidi_secrets.env".path
|
||||||
|
];
|
||||||
|
|
||||||
|
extraOptions = [
|
||||||
|
"--init" # Make an init process take up PID 1, to make python receive the SIGTERM
|
||||||
|
"--net=behind-nginx"
|
||||||
|
];
|
||||||
};
|
};
|
||||||
|
|
||||||
environmentFiles = [
|
|
||||||
config.sops.templates."heidi_secrets.env".path
|
|
||||||
];
|
|
||||||
|
|
||||||
extraOptions = [
|
|
||||||
"--init" # Make an init process take up PID 1, to make python receive the SIGTERM
|
|
||||||
"--net=behind-nginx"
|
|
||||||
];
|
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user