Skip to content

Commit b66216a

Browse files
committed
improve services page according to compose tip
1 parent dd9f070 commit b66216a

File tree

1 file changed

+23
-6
lines changed

1 file changed

+23
-6
lines changed

docs/concepts/services.md

Lines changed: 23 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -4,20 +4,37 @@ description: Defang allows you deploy services, defined as containers, to the cl
44
sidebar_position: 200
55
---
66

7-
# Services
7+
import Tabs from '@theme/Tabs';
8+
import TabItem from '@theme/TabItem';
89

9-
Defang allows you deploy services defined as containers. You can define your services using a [Compose file](./compose.md) or a [Pulumi program](./pulumi.md). Services can be exposed to the internet or kept private, and can communicate between themselves using the following conventions for hostnames:
10+
# Services
1011

11-
`<username>-<service-name>`
12+
Defang allows you deploy services defined as containers. You can define your services using a [Compose file](./compose.md) or a [Pulumi program](./pulumi.md). Services can be exposed to the internet or kept private, and can communicate between themselves using certain conventions for hostnames.
1213

1314
### Service Name Resolution
14-
As shown above, Defang identifies services by the [account username](./accounts.md) and the service name.
15+
16+
Defang identifies services by using your [account username](/docs/concepts/accounts), [project name](/docs/concepts/projects), and service name. The port is included in the [domain](/docs/concepts/domains) for the service.
17+
1518

1619
:::tip
17-
Service names are defined in your Compose file or your Pulumi program.
20+
Service names are defined in your Compose file or in your Pulumi program.
1821
:::
1922

20-
This means that if you have multiple Defang projects with the same service name, they will conflict with each other. To avoid naming conflicts, we recommend using a different name for each service you define.
23+
<Tabs>
24+
<TabItem value="playground" label="Playground" default>
25+
Domains for services in Playground follow the following pattern:
26+
```
27+
<username>-<service-name>--<port>.prod1a.defang.dev
28+
```
29+
</TabItem>
30+
<TabItem value="byoc" label="BYOC">
31+
Domains for services in Defang BYOC follow the following pattern:
32+
```
33+
<service-name>--<port>.<project-name>.<username>.defang.app
34+
```
35+
</TabItem>
36+
</Tabs>
37+
2138

2239
### Service Deployment
2340
Defang manages the deployment process for services. You can learn more about how services are deployed in the [Deployment page](./deployments.md).

0 commit comments

Comments
 (0)