Skip to content

Commit

Permalink
fix nginx configuration
Browse files Browse the repository at this point in the history
  • Loading branch information
brainrake committed Oct 22, 2024
1 parent 18ba7c7 commit b657f17
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion modules/db-sync.nix
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ in {
services.cardano-db-sync = {
enable = true;
environment = config.services.cardano-node.environments.${config.cardano.network};
cluster = config.services.cardano-node.environments.${config.cardano.network};
cluster = config.cardano.network;
inherit (config.cardano.node) socketPath;
postgres = {
user = "cardano-db-sync";
Expand Down
4 changes: 2 additions & 2 deletions modules/services/http-proxy.nix
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,7 @@ in {
return = "200 ${service.version}";
extraConfig = "add_header Content-Type text/plain;";
};
"/" = mkIf (service.port != null) {
"/" = mkIf (service.servers != [] && service.port != null) {
proxyWebsockets = true;
proxyPass = "http://${service.name}";
};
Expand Down Expand Up @@ -113,7 +113,7 @@ in {

statusPage = true;

upstreams = mapAttrs (_: cfg._mkUpstream) (lib.filterAttrs (_: s: s.port != null) cfg.services);
upstreams = mapAttrs (_: cfg._mkUpstream) (lib.filterAttrs (_: s: s.servers != [] && s.port != null) cfg.services);
virtualHosts = mapAttrs (_: cfg._mkVirtualHost) cfg.services;
};
};
Expand Down

0 comments on commit b657f17

Please sign in to comment.