SERVICE_KEY_RFC1123
Service keys (service names) in your Compose file must comply with
RFC1123 naming conventions. This is because
these names are used for DNS resolution within Portway.
While Docker Compose itself does not strictly require service names to be
RFC1123-compliant, using names that do not follow this standard can lead to DNS
resolution issues and unpredictable behavior in distributed environments. To improve
reliability and make debugging easier, Portway enforces RFC1123 compliance for all service names.
RFC1123-compliant names:
- Must consist of lower-case alphanumeric characters or
- - Must start and end with an alphanumeric character
- Must be no longer than 63 characters
SERVICE_KEY_RFC1123 validation code.
IMAGE_VERSION_NOT_SPECIFIED
If you specify an image for a service in your Compose file but do not
include a version tag (e.g., :latest, :1.2.3), Portway will
return the IMAGE_VERSION_NOT_SPECIFIED validation code.
This helps ensure that your deployments are reproducible and
predictable, as omitting a version tag can lead to unexpected
updates when the image is rebuilt or changed upstream.
ONLY_VOLUME_TYPE_ALLOWED
When defining volumes for a service in your Compose file, only
volumes of type volume are supported by Portway. If you specify
a volume of another type (such as bind or tmpfs), you will
receive the ONLY_VOLUME_TYPE_ALLOWED validation code.
This restriction ensures portability and security, as bind mounts
and other volume types may not be supported or may behave
unpredictably in cloud environments.
What to do:
- Use only named volumes (type
volume) in yourvolumessection. - If you need to include files or directories, consider adding them to your image during the build process.
IMPLICIT_ROOT_URL_PATH
If you have multiple services in your Compose file and do not specify a path for any of them, Portway will return the IMPLICIT_ROOT_URL_PATH validation code.
This helps ensure that your services are properly routed and that there are no conflicts with other services.
Example:
SERVICE_PORT_VALIDATION
When you define a route for a service using portway.route.port, Portway validates that the service has a valid port configuration. This validation ensures that your service can be properly routed and accessed.
Common issues:
- Missing port configuration: If you specify a route port but don’t define any ports for the service, you’ll get an error.
- Implicit port detection: If Portway has to guess which port to use (because you didn’t explicitly define one), you’ll get a warning.
- Always explicitly define ports in your service configuration when using routing labels.
- Use the
portssection to specify which ports your service exposes.