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
Copy file name to clipboardExpand all lines: deployment.md
+4-4Lines changed: 4 additions & 4 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -2,7 +2,7 @@
2
2
3
3
You can deploy the project using Docker Compose to a remote server.
4
4
5
-
The production Docker Compose configuration includes Traefik to handle HTTPS and route incoming traffic to the application.
5
+
The deployment Docker Compose configuration includes Traefik to handle HTTPS and route incoming traffic to the application.
6
6
7
7
You can use CI/CD (continuous integration and continuous deployment) systems to deploy automatically, there are already configurations to do it with GitHub Actions.
8
8
@@ -112,11 +112,11 @@ With the environment variables in place, you can deploy with Docker Compose:
docker compose -f compose.yml -f compose.deploy.yml up -d
117
117
```
118
118
119
-
For production you wouldn't want to have the overrides in `compose.override.yml`, that's why we explicitly specify `compose.yml` as the file to use.
119
+
The `compose.deploy.yml` file adds the deployment settings to the shared configuration in `compose.yml`, including HTTPS and automatic certificate handling. Explicitly listing these files also excludes the local development settings in `compose.override.yml`.
Copy file name to clipboardExpand all lines: development.md
+3-1Lines changed: 3 additions & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -97,14 +97,16 @@ After you update it, run again:
97
97
docker compose watch
98
98
```
99
99
100
-
Traefik is included in the main Docker Compose file. The development overrides enable its local dashboard and disable the production HTTPS configuration so you can test the domain with `localhost.tiangolo.com`.
100
+
Traefik is included in the main Docker Compose file. The development overrides expose its local dashboard so you can inspect the routes used with `localhost.tiangolo.com`.
101
101
102
102
## Docker Compose files and env vars
103
103
104
104
There is a main `compose.yml` file with all the configurations that apply to the whole stack, it is used automatically by `docker compose`.
105
105
106
106
And there's also a `compose.override.yml` with overrides for development, for example to mount the source code as a volume. It is used automatically by `docker compose` to apply overrides on top of `compose.yml`.
107
107
108
+
The `compose.deploy.yml` file contains the deployment-specific settings, including HTTPS and automatic certificate handling. It is explicitly combined with `compose.yml` when deploying the application.
109
+
108
110
These Docker Compose files use the `.env` file containing configurations to be injected as environment variables in the containers.
109
111
110
112
They also use some additional configurations taken from environment variables set in the scripts before calling the `docker compose` command.
0 commit comments