Skip to content

static port is not working #6

@cliarena

Description

@cliarena

it looks like to port works but not the static port
it just ignores it and uses a dynamic one

{ time, ... }:
let
  http = {
    port.http = {
      static = 80;
      to = 8080;
    };
  };
in {
  job.nginx = {
    datacenters = [ "dc1" ];

    group.servers = {
      networks = [ http ];

      task.server = {
        driver = "podman";

        config = {
          image = "nginxinc/nginx-unprivileged:alpine";
          ports = [ "http" ];
        };
        resources = {
          cpu = 10;
          memory = 50;
        };
        services = [{
          name = "nginx-server";
          port = "http";

          tags = [ "pi" "nginx-test-server" ];

          checks = with time; [{
            type = "http";
            path = "/index.html";
            interval = 2 * second;
            timeout = 2 * second;
          }];
        }];
      };
    };
  };
}

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions