# The cluster's listeners and endpoints, in the `hourctl apply` layout # (see the example setup file in the Hour Advantage docs). They are kept in Postgres, so applying them # through any one instance sets up every instance: # # docker compose exec -e HOURADVANTAGE_ADMIN_PASSWORD gateway hourctl apply /etc/houradvantage/setup.toml # # One device port, 8080, which HAProxy exposes (fe_http_8080) and publishes # on the host as 28080. Endpoints share it and are told apart by path, so # more endpoints can be added later, here or through the admin API, with no # change to HAProxy. A listener on another port also needs that port exposed # (docker-compose.yml and haproxy.cfg; `hourctl export lb haproxy`). # HAProxy is on the compose network: X-Forwarded-For is believed from it # only, so the gateways see each clock's own address. Must match # COMPOSE_SUBNET in .env, and come before the first [section]. trusted_proxies = ["172.30.28.0/24"] [[listener]] id = "devices" type = "http" listen = "0.0.0.0:8080" # "hold" keeps a clock that calls in waiting until someone allows it # (`hourctl device register office `, or `hourctl device allow`). # "allow" would let any clock that calls in register itself: only for # trying the stack out on a network no stranger can reach. [[endpoint]] id = "office" listener = "devices" path = "/office" package = "zk-push@3.4" new_devices = "hold" options = { timezone = "America/Chicago" }