Skip to content

Commit bb77b1e

Browse files
docs(self-hosted): explicitly specify how to handle .env.custom file (#11807)
* docs(self-hosted): explicitly specify how to handle .env.custom file * Update index.mdx Co-authored-by: Hubert Deng <[email protected]> --------- Co-authored-by: Hubert Deng <[email protected]>
1 parent 9c8939b commit bb77b1e

File tree

2 files changed

+12
-1
lines changed

2 files changed

+12
-1
lines changed

develop-docs/self-hosted/index.mdx

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -178,6 +178,16 @@ By default, there exists no `.env.custom` file. In this case, you can manually a
178178

179179
Please keep in mind to check the `.env` file for changes, when you perform an upgrade of Sentry, so that you can adjust your `.env.custom` accordingly, if required, as `.env` is ignored entirely if `.env.custom` is present.
180180

181+
For all Docker Compose commands, you should specify your `.env.custom`, otherwise the default `.env` file will be used. Some examples are:
182+
183+
```bash
184+
docker compose --env-file .env.custom up -d
185+
186+
# You can also specify the original `.env` file as a fallback if the
187+
# environment variable doesn't exists on the `.env.custom` file.
188+
docker compose --env-file .env --env-file .env.custom up -d
189+
```
190+
181191
### Enhance Sentry image
182192

183193
To install plugins and their dependencies or make other modifications to the Sentry base image, copy `sentry/enhance-image.example.sh` to `sentry/enhance-image.sh` and add necessary steps there. For example, you can use `apt-get` to install dependencies and use `pip` to install plugins.

develop-docs/self-hosted/releases.mdx

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,8 +36,9 @@ git checkout 23.11.0
3636

3737
We may have some updated configuration, especially for new features, so always check the example config files under the <Link to="https://github.com/getsentry/self-hosted/blob/master/sentry/">sentry directory</Link> and see if you need to update your existing configuration. We do our best to automate critical configuration updates, but you should always check your configs during upgrades.
3838

39-
Finally, to upgrade, just run `./install.sh`.
39+
If you have a `.env.custom` file, make sure to copy new environment variables from the `.env` file into the `.env.custom` file before running the install script.
4040

41+
Finally, to upgrade, run `./install.sh`. Upon completion, run `docker compose up -d` (or if you have `.env.custom` file, run `docker compose --env-file .env --env-file .env.custom up -d`).
4142

4243
### Hard Stops
4344

0 commit comments

Comments
 (0)