diff --git a/docker-compose.yml b/docker-compose.yml index 19f25eb..ccf1346 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -19,9 +19,11 @@ x-sentry-defaults: &sentry_defaults - symbolicator - kafka environment: + SENTRY_CONF: '/etc/sentry' SNUBA: 'http://snuba-api:1218' volumes: - 'sentry-data:/data' + - './sentry:/etc/sentry' x-snuba-defaults: &snuba_defaults << : *restart_policy depends_on: diff --git a/sentry/.dockerignore b/sentry/.dockerignore new file mode 100644 index 0000000..693a7e0 --- /dev/null +++ b/sentry/.dockerignore @@ -0,0 +1,5 @@ +# Ignore everything +* + +# Only allow requirements.txt +!/requirements.txt diff --git a/sentry/Dockerfile b/sentry/Dockerfile index 032f340..bf8f198 100644 --- a/sentry/Dockerfile +++ b/sentry/Dockerfile @@ -1,18 +1,7 @@ ARG SENTRY_IMAGE FROM ${SENTRY_IMAGE:-getsentry/sentry:latest} -WORKDIR /usr/src/sentry - -# Add WORKDIR to PYTHONPATH so local python files don't need to be installed -ENV PYTHONPATH /usr/src/sentry COPY . /usr/src/sentry # Hook for installing additional plugins RUN if [ -s requirements.txt ]; then pip install -r requirements.txt; fi - -# Hook for installing a local app as an addon -RUN if [ -s setup.py ]; then pip install -e .; fi - -# Hook for staging in custom configs -RUN if [ -s sentry.conf.py ]; then cp sentry.conf.py $SENTRY_CONF/; fi \ - && if [ -s config.yml ]; then cp config.yml $SENTRY_CONF/; fi