docs: Update how multiple ports work
This commit is contained in:
parent
b95d6c683e
commit
d3ebcac391
|
|
@ -28,7 +28,7 @@ When you come to create the config.yaml file, OliveTin will look for this in it'
|
|||
|
||||
Because you are running outside of a container, you will also need to change the "internal" ports used by OliveTin so they are separate for all instances. OliveTin listens on 4 addresses (1 external, 3 internal) and needs 4 ports. You can read about these in the xref:reference/network-ports.adoc[network ports documentation].
|
||||
|
||||
NOTE: OliveTin also supports reading the PORT environment variable, and will use this as a base port for the simgle frontend, will add 1 to start extra servers. For example of PORT is 2000, then the simgle frontend will start on port 2000, the REST API on 2001, and so on.
|
||||
NOTE: If the `PORT` environment variable is set, OliveTin listens on that port for the single HTTP frontend (overriding `listenAddressSingleHTTPFrontend` in the config). When `PORT` is unset, the config value is used, or `1337` if that setting is omitted. `PORT` is also used as a base for the other internal listen addresses (+1, +2, …) when those are not set in the config. For example, if `PORT` is 2000, the single frontend starts on port 2000, the REST API on 2001, and so on.
|
||||
|
||||
You could end up with a setup that looks like this;
|
||||
|
||||
|
|
@ -55,5 +55,3 @@ Restart=always
|
|||
[Install]
|
||||
WantedBy=multi-user.target
|
||||
----
|
||||
|
||||
|
||||
|
|
|
|||
|
|
@ -51,6 +51,12 @@ Below is a detailed reference table.
|
|||
| `listenAddressPrometheus: localhost:1341` | Hosts a prometheus endpoint, which is disabled by default. See xref:advanced_configuration/prometheus.adoc[Prometheus] to learn more.
|
||||
|===
|
||||
|
||||
== PORT environment variable
|
||||
|
||||
If the `PORT` environment variable is set at startup, OliveTin uses it as the listen port for `listenAddressSingleHTTPFrontend`, keeping the host from the config (default host `0.0.0.0`). This overrides an explicit port in `config.yaml`, which is useful on platforms that assign a port via `PORT` (for example Heroku or Cloud Run).
|
||||
|
||||
When `PORT` is not set, OliveTin uses `listenAddressSingleHTTPFrontend` from the config, or `0.0.0.0:1337` if that setting is omitted.
|
||||
|
||||
== See also
|
||||
|
||||
* xref:reference/multiple_instances[Running Multiple instances of OliveTin on the same server]
|
||||
|
|
|
|||
Loading…
Reference in New Issue