+ portUtils +metabase
This commit is contained in:
@@ -1,8 +1,13 @@
|
||||
{
|
||||
config,
|
||||
lib,
|
||||
pkgs,
|
||||
...
|
||||
}: let
|
||||
serviceName = "librechat-dev";
|
||||
portUtils = import ../../../../lib/port-utils.nix {inherit lib;};
|
||||
servicePort = portUtils.getPort serviceName "AZ-CLD-1";
|
||||
ragApiDevPort = portUtils.getPort "rag-api-dev" "AZ-CLD-1";
|
||||
envFileDev = config.age.secrets.librechat-env-dev.path;
|
||||
in {
|
||||
virtualisation.oci-containers = {
|
||||
@@ -29,7 +34,7 @@ in {
|
||||
environmentFiles = [envFileDev];
|
||||
dependsOn = ["meilisearch-dev"];
|
||||
extraOptions = ["--add-host=postgres:10.89.1.1" "--ip=10.89.1.21" "--network=web-dev"];
|
||||
ports = ["127.0.0.1:8100:8000"];
|
||||
ports = ["127.0.0.1:${toString ragApiDevPort}:8000"];
|
||||
};
|
||||
|
||||
containers.mongodb-dev = {
|
||||
@@ -42,10 +47,10 @@ in {
|
||||
extraOptions = ["--ip=10.89.1.22" "--network=web-dev"];
|
||||
};
|
||||
|
||||
containers.librechat-dev = {
|
||||
containers.${serviceName} = {
|
||||
image = "ghcr.io/danny-avila/librechat-dev-api:latest";
|
||||
autoStart = false;
|
||||
ports = ["127.0.0.1:3141:3080"];
|
||||
ports = ["127.0.0.1:${toString servicePort}:3080"];
|
||||
dependsOn = ["mongodb-dev" "rag_api-dev" "meilisearch-dev"];
|
||||
environment = {
|
||||
HOST = "0.0.0.0";
|
||||
@@ -66,15 +71,24 @@ in {
|
||||
};
|
||||
};
|
||||
|
||||
# Traefik configuration
|
||||
services.traefik.dynamicConfigOptions.http = {
|
||||
services.librechat-dev.loadBalancer.servers = [{url = "http://localhost:3141/";}];
|
||||
routers.librechat-dev = {
|
||||
services.${serviceName}.loadBalancer.servers = [
|
||||
{
|
||||
url = "http://localhost:${toString servicePort}/";
|
||||
}
|
||||
];
|
||||
|
||||
routers.${serviceName} = {
|
||||
rule = "Host(`chat-dev.az-gruppe.com`)";
|
||||
tls.certResolver = "ionos";
|
||||
service = "librechat-dev";
|
||||
tls = {
|
||||
certResolver = "ionos";
|
||||
};
|
||||
service = serviceName;
|
||||
entrypoints = "websecure";
|
||||
};
|
||||
};
|
||||
|
||||
environment.systemPackages = [
|
||||
(pkgs.writeShellScriptBin "librechat-dev" ''
|
||||
#!/usr/bin/env bash
|
||||
|
||||
Reference in New Issue
Block a user