edge
Generated from the code · as of CLI 0.6.0
Which service answers HTTP for the arc, or none if nothing should.
- Type:
noneor map - Required: yes
- Errors:
edge-undeclared,edge-service-unknown,edge-service-not-deployed,edge-port-zero,edge-port-unpublished,edge-port-host-bound,edge-port-not-fixed,overlay-parse
The edge is the one public HTTP route of an arc. Point it at a service and the container port that service listens on, or write edge: none for an arc with no web address.
The key is required so that having no route is something you chose rather than something you find out later. Leaving it out is an error.
omniarc sync guesses it, in order: the one published HTTP-looking port (80, 443, 3000, 5000, 8000, 8080); else the one service publishing such a port through a variable host port (${LISTEN_HTTP_PORT}:80), whose variable the arc's .env must set unless compose gives it a default (${LISTEN_HTTP_PORT:-80}); else the one fixed published port on a service that is not a database or cache. Where a step finds several candidates, the guess stops there with edge: none and lists them for you to choose one; a later step is tried only when every earlier one found none.
The port must also be published in compose at one fixed host port. Add a line like this to the service:
ports: ["80:80"]
These do not work, and each has its own error: no ports entry for that container port, a port bound to one address such as 127.0.0.1:80:80, a port with no host side such as "80", and a range such as "8000-8010:80".
The service must be deployed. An edge that points at a service with deploy: false is refused.
edge: { service: web, port: 80 }#
edge.service
The compose service that answers HTTP.
- Type: string
- Required: yes
- Errors:
edge-service-unknown,edge-service-not-deployed
It must be a service compose defines in the profiles you turned on, and it must be deployed.
#
edge.port
The container port the service listens on.
- Type: integer, 1 to 65535
- Required: yes
- Errors:
edge-port-zero,edge-port-unpublished,edge-port-host-bound,edge-port-not-fixed,overlay-parse
This is the port inside the container, not the host port. The matching host port comes from the ports entry in compose.