+ portUtils +metabase
This commit is contained in:
11
lib/port-utils.nix
Normal file
11
lib/port-utils.nix
Normal file
@@ -0,0 +1,11 @@
|
||||
{lib}: let
|
||||
ports = import ./ports.nix;
|
||||
in {
|
||||
# Get port for a service, with optional host-specific override
|
||||
getPort = service: host:
|
||||
ports.hostPorts.${host}.${service} or ports.ports.${service};
|
||||
|
||||
# Get all ports for a specific host
|
||||
getHostPorts = host:
|
||||
lib.mapAttrs (_: port: port) (ports.ports // (ports.hostPorts.${host} or {}));
|
||||
}
|
||||
48
lib/ports.nix
Normal file
48
lib/ports.nix
Normal file
@@ -0,0 +1,48 @@
|
||||
{
|
||||
ports = {
|
||||
# Infrastructure
|
||||
traefik = {
|
||||
http = 80;
|
||||
https = 443;
|
||||
};
|
||||
|
||||
# Core services (3000-3099 range)
|
||||
gitea = 3030;
|
||||
outline = 3031;
|
||||
vaultwarden = 3032;
|
||||
baserow = 3050;
|
||||
zammad = 3034;
|
||||
metabase = 3013;
|
||||
ntfy-sh = 3033;
|
||||
|
||||
# Docker services (3100-3199 range)
|
||||
librechat = 3040;
|
||||
librechat-dev = 3141;
|
||||
rag-api = 8000;
|
||||
rag-api-dev = 8100;
|
||||
litellm = 4000;
|
||||
|
||||
# Workflow/automation (5000-5999 range)
|
||||
n8n = 5678;
|
||||
kestra = 5080;
|
||||
|
||||
# Management tools (9000-9999 range)
|
||||
portainer = 9000;
|
||||
};
|
||||
|
||||
# Host-specific port allocations
|
||||
hostPorts = {
|
||||
AZ-CLD-1 = {
|
||||
# Development environment gets higher port ranges
|
||||
baserow = 3050;
|
||||
librechat-dev = 3141;
|
||||
rag-api-dev = 8100;
|
||||
};
|
||||
|
||||
AZ-PRM-1 = {
|
||||
# Production gets clean base ports
|
||||
baserow = 3051; # Changed to avoid conflict
|
||||
kestra = 5080; # Changed to avoid conflict
|
||||
};
|
||||
};
|
||||
}
|
||||
Reference in New Issue
Block a user