Skip to main content

Services

Defang allows you deploy services defined as containers. You can define your services using a Compose file or a Pulumi program. Services can be exposed to the internet or kept private, and can communicate between themselves using certain conventions for hostnames.

Service Name Resolution

Defang identifies services by using your account username, project name, and service name. The port is included in the domain for the service.

tip

Service names are defined in your Compose file or in your Pulumi program.

Domains for services in Playground follow the following pattern:

<username>-<service-name>--<port>.prod1a.defang.dev

Service Deployment

Defang manages the deployment process for services. You can learn more about how services are deployed in the Deployment page.

info

We plan to add support for other types of services in the future, including serverless functions.

Service Status

An overview of the possible statuses for a service in Defang.

StatusDetails
BUILD_QUEUEDThe service update has been received and is now in the queue for its image to be built.
BUILD_PROVISIONINGThe container orchestrator is provisioning the necessary resources for building your service's image.
BUILD_PENDINGThe necessary resources to build your service have been provisioned but the build has not yet been initiated.
BUILD_ACTIVATINGThe container orchestrator is pulling the build container's image and creating the build container.
BUILD_RUNNINGThe container which builds your service's image is successfully running.
BUILD_STOPPINGThe container orchestrator has sent a termination signal to the build container and is waiting for the build process to stop.
BUILD_FAILEDThe build container exited with a non-zero status code.
UPDATE_QUEUEDThe service update has been received and is now in the queue.
SERVICE_DEPLOYMENT_PENDINGThe necessary resources to run your service have been provisioned but the service has not yet been initiated.
SERVICE_DEPLOYMENT_COMPLETEDYour service has been deployed and is healthy.
SERVICE_DEPLOYMENT_FAILEDYour service could not be deployed.
tip

You can run the defang compose ps command to view the status of your services.