Definitions and instances
A service definition supplies reusable image and runtime configuration. A deployment declaration instantiates it under a service name in the target project. A definition alone creates no remote service; deploying a declaration creates or updates the service instances it names. A service instance is the named remote service; its replicas are the running containers. Its identity persists across replica replacements and deployment versions. Stateless services can run multiple container replicas behind the same service identity. A singleton service permits at most one running replica per service in a project. During replacement, the previous replica stops before its successor starts. Persistent local storage requires an attached volume; singleton execution alone does not preserve data.Required and optional configuration
A start command is split into arguments with shell-style quoting. A shell is
not automatically invoked.
Build source
A build source identifies the source tree, build context, Dockerfile, and target stage. Each setting has a default:
Paths are relative and checked lexically:
root must stay within the
application directory, and context and dockerfile within the root.
Networking and endpoints
Services are addressable as<instance>.internal within their project.
Internal communication does not require port declarations. Without public
exposure, a service is directly reachable only within its project.
The application chooses its listen port. Uniac does not automatically supply
a PORT variable or configure the application to match a public endpoint.
Public endpoints
A public endpoint forwards incoming traffic to the application’s listen port. Endpoints are declared on the service instance, independently of its reusable definition.
Public exposure is optional. Each requested endpoint specifies:
The platform accepts ports 1–65535 and at most one exposure of each type per
service. These limits are enforced during deployment, beyond local schema
validation.
Environment and references
Environment variables provide runtime configuration to a service’s containers. Their values can refer to the service’s own configuration or to another service in the same project. The platform resolves declared values at deployment time and injects them at container start. Other environment defaults are the image’s own. Environment configuration is optional. Each declared variable requires a name and a plaintext string value, optionally containing references. Names match^[A-Za-z_][A-Za-z0-9_]*$; host is reserved for the builtin reference.
At deployment, the platform accepts at most 64 declared variables, with names
up to 128 characters and values up to 4096 characters.
References
A reference’s scope names a service instance, independently of its definition name.${{self.VAR}} names a variable on the declaring service.
host is the only builtin and means the referenced service’s internal
hostname.
References have this grammar:
self remains bound to the
service that declared each value. There is no escape syntax; every ${{
opener must form a valid reference.
Resolution
References toself must name a builtin or a declared variable. Composition
of a deployment checks references to other instances in that deployment
against their declared variables and builtins, and rejects reference cycles.
A name outside the selected deployment passes through for remote resolution,
even if another deployment in the file defines it. Remote references resolve
within the target project.
Remote references use services with a serving deployment. For those services,
host supplies the internal hostname without requiring a running replica;
a custom-variable reference requires that variable in the service’s resolved
environment.
An unresolved reference omits the affected variable from Uniac’s injected
values and produces a warning; it does not fail the deployment. After a
successful deployment, the platform re-resolves the project’s other services
and recreates those whose injected values changed. Uniac provides no
dependency ordering or readiness coordination.
YAML composition example
In YAML composition,type: service selects
stateless execution and type: singleton selects singleton execution. Exactly
one of image or build supplies the container source; image: "" counts
as absent. Optional configuration uses env, the start_command string,
and the volumes list. env maps variable names to string values.
build accepts a string naming the build root or an object containing the
build fields above. An empty string selects the default root; build: null
is invalid. The application directory is the directory containing
uniac.yaml.
services.<instance>.public_ports is an optional list of mappings, each with
port and type. Its presence has three meanings on deployment:
The
web-code and cache-code resources are definitions. Deploying
web-deployment instantiates only web; cache-deployment instantiates
cache. The from field connects each instance to its definition.
The stateless web service receives the URL declared by cache, which uses
cache’s own internal hostname. The web service’s port 8080 is exposed through
HTTPS and a separately allocated raw TCP endpoint. The singleton cache service starts
Redis with append-only persistence on a 1 GB volume mounted at /data.
container.source.ref for image and
container.source.build for build. type: singleton adds kind: singleton,
while type: service omits kind. Build paths are normalized and omitted at
their defaults; an all-defaults build is {}.

