Skip to content

Commit ecf160f

Browse files
committed
docs: update env file docs
1 parent bfeba6e commit ecf160f

1 file changed

Lines changed: 10 additions & 2 deletions

File tree

docs/pages/configuration/variables.mdx

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -132,8 +132,16 @@ vars:
132132
</Tabs>
133133

134134

135-
### From `.env` File
136-
DevSpace also reads environment variables from the `.env` file inside your project. The syntax of the `.env` file is the [same as for docker-compose](https://docs.docker.com/compose/env-file/):
135+
### `$DEVSPACE_ENV_FILE` for `.env` File definition
136+
DevSpace can also read environment variables from an environment file such as `.env` inside your project. Point DevSpace to your env file via the `DEVSPACE_ENV_FILE` environment variable.
137+
This can also be used inside a `devspace.yaml` under the vars section:
138+
139+
```yaml
140+
vars:
141+
DEVSPACE_ENV_FILE: ".env"
142+
```
143+
144+
The syntax of the `.env` file is the [same as for docker-compose](https://docs.docker.com/compose/env-file/):
137145

138146
- Each line should have the format `VAR_NAME=VAR_VALUE`.
139147
- **There is *no* special handling of quotation marks. This means that they are part of the `VAR_VALUE`.**

0 commit comments

Comments
 (0)