Skip to content

Commit 12cc9f7

Browse files
committed
feat(compose): Add ability to use custom images for any Sentry service (#602)
This change allows one to override any Sentry service image, mostly for testing purposes. It also removes the SENTRY_VERSION variable as docker-compose makes it very hard to cascade default values for these. Next step is to have integration tests in getsentry/snuba and getsentry/relay (and possibly for getsentry/symbolicator) for getsentry/onpremise using this PR. Also related: #596.
1 parent 90716a7 commit 12cc9f7

File tree

3 files changed

+9
-8
lines changed

3 files changed

+9
-8
lines changed

.env

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,6 @@
11
COMPOSE_PROJECT_NAME=sentry_onpremise
22
SENTRY_EVENT_RETENTION_DAYS=90
3-
SENTRY_VERSION=10.0.0
3+
SENTRY_IMAGE=getsentry/sentry:10.0.0
4+
SNUBA_IMAGE=getsentry/snuba:10.0.0
5+
RELAY_IMAGE=getsentry/relay:10.0.0
6+
SYMBOLICATOR_IMAGE=getsentry/symbolicator:8ac8f400fb7416c6c46fad856cdba2bc70c27c6c

docker-compose.yml

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,6 @@ x-sentry-defaults: &sentry_defaults
77
context: ./sentry
88
args:
99
- SENTRY_IMAGE
10-
- SENTRY_VERSION
1110
image: sentry-onpremise-local
1211
depends_on:
1312
- redis
@@ -30,7 +29,7 @@ x-snuba-defaults: &snuba_defaults
3029
- redis
3130
- clickhouse
3231
- kafka
33-
image: 'getsentry/snuba:$SENTRY_VERSION'
32+
image: '$SNUBA_IMAGE'
3433
environment:
3534
SNUBA_SETTINGS: docker
3635
CLICKHOUSE_HOST: clickhouse
@@ -126,11 +125,11 @@ services:
126125
build:
127126
context: ./cron
128127
args:
129-
BASE_IMAGE: 'getsentry/snuba:$SENTRY_VERSION'
128+
BASE_IMAGE: '$SNUBA_IMAGE'
130129
command: '"*/5 * * * * gosu snuba snuba cleanup --dry-run False"'
131130
symbolicator:
132131
<< : *restart_policy
133-
image: 'getsentry/symbolicator:8ac8f400fb7416c6c46fad856cdba2bc70c27c6c'
132+
image: '$SYMBOLICATOR_IMAGE'
134133
volumes:
135134
- 'sentry-symbolicator:/data'
136135
command: run
@@ -140,7 +139,7 @@ services:
140139
build:
141140
context: ./cron
142141
args:
143-
BASE_IMAGE: 'getsentry/symbolicator:8ac8f400fb7416c6c46fad856cdba2bc70c27c6c'
142+
BASE_IMAGE: '$SYMBOLICATOR_IMAGE'
144143
command: '"55 23 * * * gosu symbolicator symbolicator cleanup"'
145144
volumes:
146145
- 'sentry-symbolicator:/data'

sentry/Dockerfile

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
1-
ARG SENTRY_VERSION=latest
21
ARG SENTRY_IMAGE
3-
FROM ${SENTRY_IMAGE:-getsentry/sentry:$SENTRY_VERSION}
2+
FROM ${SENTRY_IMAGE}
43

54
WORKDIR /usr/src/sentry
65

0 commit comments

Comments
 (0)