Skip to content

Commit 3e71f86

Browse files
improve documentation related to updating w/ deployment modes
1 parent cccf54e commit 3e71f86

File tree

1 file changed

+22
-2
lines changed

1 file changed

+22
-2
lines changed

docs/tutorials/updating-your-services.md

Lines changed: 22 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,28 @@ description: How to update services deployed with Defang
66

77
# Updating Your Services
88

9-
To update your app (for example, updating the base image of your container, or making changes to your code) you can run the `defang compose up` command and it will build and deploy a new version with zero downtime. Your current version of the service will keep running and handling traffic while the new version is being built and deployed. Only after the new version passes the health checks and accepts traffic will the older version be stopped.
9+
To update your app (for example, updating the base image of your container, or making changes to your code) all you have to do is run the `defang compose up` command and it will build and deploy a new version.
10+
11+
## Deploying New Services or Removing Existing Services
1012

11-
:::info
1213
If you are using [compose files](../concepts/compose.md) to define your services, you can add/remove services, make changes to code, etc. When you run `defang compose up`, the update will be diffed against the current state and any necessary changes will be applied to make the current state match the desired state.
14+
15+
## Deployment Modes
16+
17+
Defang offers multiple [deployment modes](/docs/concepts/deployment-modes). You can specify which mode you would like to be used when you deploy with the `--mode` flag on the CLI. The default mode is `development`. You may also specify `staging` or `production`.
18+
19+
```shell
20+
$ defang compose up --mode=production
21+
```
22+
23+
### Development Mode (Default)
24+
25+
The default deployment mode is `development`. This is the In this mode, the existing services will be deprovisioned before your new service will be spun up. This means that there will be a short downtime while the new service is being provisioned.
26+
27+
### Production Mode (Zero-downtime Updates)
28+
29+
If you are running in `production` mode, the update will be done with zero downtime. Your current version of the service will keep running and handling traffic while the new version is being built and deployed. Only after the new version passes the health checks and accepts traffic will the older version be stopped.
30+
31+
:::info
32+
For more information on Deployment Modes, see the [Deployment Modes](/docs/concepts/deployment-modes) concept documentation.
1333
:::

0 commit comments

Comments
 (0)