Skip to content

Commit b47f490

Browse files
committed
Document env vars usage in docker-compose
Closes #216
1 parent fc28271 commit b47f490

File tree

1 file changed

+30
-1
lines changed

1 file changed

+30
-1
lines changed

docs/Advanced.md

Lines changed: 30 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,36 @@ Deploying using docker compose works almost the same as using a normal docker co
3939

4040
Any of the [configuration options](https://docs.traefik.io/configuration/backends/docker/#on-containers) for the default Traefik docker setup can be used.
4141

42-
If you have a docker-compose.yml file, __any domain set in exoframe.json will be ignored__.
42+
If you have a docker-compose.yml file, **any domain set in exoframe.json will be ignored**.
43+
44+
For the most part, Exoframe doesn't pass anything from `exoframe.json` to the compose.
45+
However, one thing that is being passed is environmental variables.
46+
You can use any variables defined in `exoframe.json` in your compose file.
47+
First, define them in your `exoframe.json`:
48+
49+
```json
50+
{
51+
"name": "test-compose-deploy",
52+
"env": {
53+
"CUSTOM_LABEL": "custom-value",
54+
"CUSTOM_SECRET": "@test-secret"
55+
}
56+
}
57+
```
58+
59+
Then use them inside your `docker-compose.yml`:
60+
61+
version: '2'
62+
services:
63+
web:
64+
build: .
65+
labels:
66+
traefik.frontend.rule: 'Host:test.dev'
67+
traefik.port: 8080 # default: 80
68+
custom.envvar: "${CUSTOM_LABEL}"
69+
custom.secret: "${CUSTOM_SECRET}"
70+
redis:
71+
image: "redis:alpine"
4372

4473
## Rate limiting
4574

0 commit comments

Comments
 (0)