Skip to content

Commit dd5a7d4

Browse files
author
Stephen Cefali
authored
docs: explain changing version on Linux (#922)
Explains how to set the version on Linux where `sudo` is required. Based on this Stack overflow answer: https://stackoverflow.com/questions/8633461/how-to-keep-environment-variables-when-using-sudo/8636711#8636711
1 parent aecc75b commit dd5a7d4

File tree

1 file changed

+18
-0
lines changed

1 file changed

+18
-0
lines changed

README.md

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -40,6 +40,24 @@ SENTRY_IMAGE=getsentry/sentry:83b1380 ./install.sh
4040

4141
Note that this may not work for all commit SHAs as this repository evolves with Sentry and its satellite projects. It is highly recommended to check out a version of this repository that is close to the timestamp of the Sentry commit you are installing.
4242

43+
### Using Linux
44+
45+
If you are using Linux and you need to use `sudo` when running `./install.sh`, modifying the version of Sentry is slightly different. First, run the following:
46+
```shell
47+
sudo visudo
48+
```
49+
Then add the following line:
50+
```shell
51+
Defaults env_keep += "SENTRY_IMAGE"
52+
```
53+
Save the file then in your terminal run the following
54+
55+
```shell
56+
export SENTRY_IMAGE=us.gcr.io/sentryio/sentry:83b1380
57+
sudo ./install.sh
58+
```
59+
Where you replace `83b1380` with the sha you want to use.
60+
4361
## Event Retention
4462

4563
Sentry comes with a cleanup cron job that prunes events older than `90 days` by default. If you want to change that, you can change the `SENTRY_EVENT_RETENTION_DAYS` environment variable in `.env` or simply override it in your environment. If you do not want the cleanup cron, you can remove the `sentry-cleanup` service from the `docker-compose.yml`file.

0 commit comments

Comments
 (0)