You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Use Compose Watch to automatically update your running Compose services as you
32
32
edit and save your code. For more details about Compose Watch, see [Use Compose
33
-
Watch](/manuals/compose/file-watch.md).
33
+
Watch](/manuals/compose/how-tos/file-watch.md).
34
34
35
35
Open your `compose.yml` file in an IDE or text editor and then add the Compose Watch instructions. The following example shows how to add Compose Watch to your `compose.yml` file.
36
36
@@ -67,7 +67,7 @@ In this section, you also learned how to use Compose Watch to automatically rebu
Copy file name to clipboardExpand all lines: content/guides/language/dotnet/develop.md
+2-2
Original file line number
Diff line number
Diff line change
@@ -229,7 +229,7 @@ Press `ctrl+c` in the terminal to stop your application.
229
229
230
230
## Automatically update services
231
231
232
-
Use Compose Watch to automatically update your running Compose services as you edit and save your code. For more details about Compose Watch, see [Use Compose Watch](/manuals/compose/file-watch.md).
232
+
Use Compose Watch to automatically update your running Compose services as you edit and save your code. For more details about Compose Watch, see [Use Compose Watch](/manuals/compose/how-tos/file-watch.md).
233
233
234
234
Open your `compose.yaml` file in an IDE or text editor and then add the Compose Watch instructions. The following is the updated `compose.yaml` file.
235
235
@@ -387,7 +387,7 @@ database and persist data. You also learned how to use Compose Watch to automati
Copy file name to clipboardExpand all lines: content/guides/language/php/develop.md
+2-2
Original file line number
Diff line number
Diff line change
@@ -240,7 +240,7 @@ Press `ctrl+c` in the terminal to stop your application.
240
240
241
241
## Automatically update services
242
242
243
-
Use Compose Watch to automatically update your running Compose services as you edit and save your code. For more details about Compose Watch, see [Use Compose Watch](/manuals/compose/file-watch.md).
243
+
Use Compose Watch to automatically update your running Compose services as you edit and save your code. For more details about Compose Watch, see [Use Compose Watch](/manuals/compose/how-tos/file-watch.md).
244
244
245
245
Open your `compose.yaml` file in an IDE or text editor and then add the Compose Watch instructions. The following is the updated `compose.yaml` file.
246
246
@@ -422,7 +422,7 @@ database and persist data. You also learned how to use Compose Watch to automati
Copy file name to clipboardExpand all lines: content/guides/language/rust/develop.md
+1-1
Original file line number
Diff line number
Diff line change
@@ -281,7 +281,7 @@ secrets:
281
281
file: db/password.txt
282
282
```
283
283
284
-
Note that the file doesn't specify a network for those 2 services. When you use Compose, it automatically creates a network and connects the services to it. For more information see [Networking in Compose](/manuals/compose/networking.md).
284
+
Note that the file doesn't specify a network for those 2 services. When you use Compose, it automatically creates a network and connects the services to it. For more information see [Networking in Compose](/manuals/compose/how-tos/networking.md).
285
285
286
286
Before you run the application using Compose, notice that this Compose file specifies a `password.txt` file to hold the database's password. You must create this file as it's not included in the source repository.
Copy file name to clipboardExpand all lines: content/manuals/compose/gettingstarted.md
+4-4
Original file line number
Diff line number
Diff line change
@@ -7,7 +7,7 @@ keywords: docker compose example, docker compose tutorial, how to use docker com
7
7
file, run a docker compose file
8
8
title: Docker Compose Quickstart
9
9
linkTitle: Quickstart
10
-
weight: 40
10
+
weight: 30
11
11
---
12
12
13
13
This tutorial aims to introduce fundamental concepts of Docker Compose by guiding you through the development of a basic Python web application.
@@ -241,7 +241,7 @@ services:
241
241
242
242
Whenever a file is changed, Compose syncs the file to the corresponding location under `/code` inside the container. Once copied, the bundler updates the running application without a restart.
243
243
244
-
For more information on how Compose Watch works, see [Use Compose Watch](file-watch.md). Alternatively, see [Manage data in containers](/manuals/engine/storage/volumes.md) for other options.
244
+
For more information on how Compose Watch works, see [Use Compose Watch](/manuals/compose/how-tos/file-watch.md). Alternatively, see [Manage data in containers](/manuals/engine/storage/volumes.md) for other options.
245
245
246
246
> [!NOTE]
247
247
>
@@ -316,7 +316,7 @@ Using multiple Compose files lets you customize a Compose application for differ
316
316
317
317
4. Run `docker compose up` to build the app with the updated Compose files, and run it. You should see the `Hello world` message in your browser.
318
318
319
-
This is a simplified example, but it demonstrates the basic principle of `include` and how it can make it easier to modularize complex applications into sub-Compose files. For more information on `include` and working with multiple Compose files, see [Working with multiple Compose files](multiple-compose-files/_index.md).
319
+
This is a simplified example, but it demonstrates the basic principle of `include` and how it can make it easier to modularize complex applications into sub-Compose files. For more information on `include` and working with multiple Compose files, see [Working with multiple Compose files](/manuals/compose/how-tos/multiple-compose-files/_index.md).
320
320
321
321
## Step 8: Experiment with some other commands
322
322
@@ -349,6 +349,6 @@ This is a simplified example, but it demonstrates the basic principle of `includ
349
349
## Where to go next
350
350
351
351
- Try the [Sample apps with Compose](https://github.com/docker/awesome-compose)
352
-
- [Explore the full list of Compose commands](reference/_index.md)
352
+
- [Explore the full list of Compose commands](/reference/cli/docker/compose.md)
353
353
- [Explore the Compose file reference](/reference/compose-file/_index.md)
354
354
- [Check out the Learning Docker Compose video on LinkedIn Learning](https://www.linkedin.com/learning/learning-docker-compose/)
By leveraging environment variables and interpolation in Docker Compose, you can create versatile and reusable configurations, making your Dockerized applications easier to manage and deploy across different environments.
When the same environment variable is set in multiple sources, Docker Compose follows a precedence rule to determine the value for that variable in your container's environment.
title: Set or change pre-defined environment variables in Docker Compose
5
5
linkTitle: Pre-defined environment variables
6
+
weight: 30
6
7
aliases:
7
8
- /compose/reference/envvars/
9
+
- /compose/environment-variables/envvars/
8
10
---
9
11
10
12
Compose already comes with pre-defined environment variables. It also inherits common Docker CLI environment variables, such as `DOCKER_HOST` and `DOCKER_CONTEXT`. See [Docker CLI environment variable reference](/reference/cli/docker/#environment-variables) for details.
@@ -184,7 +186,7 @@ This is an opt-out variable. When turned off it deactivates the experimental fea
184
186
## Unsupported in Compose V2
185
187
186
188
The following environment variables have no effect in Compose V2.
187
-
For more information, see [Migrate to Compose V2](../migrate.md).
189
+
For more information, see [Migrate to Compose V2](/manuals/compose/releases/migrate.md).
188
190
189
191
-`COMPOSE_API_VERSION`
190
192
By default the API version is negotiated with the server. Use `DOCKER_API_VERSION`.
A container's environment is not set until there's an explicit entry in the service configuration to make this happen. With Compose, there are two ways you can set environment variables in your containers with your Compose file.
0 commit comments