I have setup sentry with docker in a machine. I would like to integrate GitHub plugin. For this I need to add some settings to the config file.
The docker compose file is, ,
version: '2'
services:
redis:
image: redis
postgres:
image: 'postgres'
environment:
POSTGRES_USER: postgres
POSTGRES_PASSWORD: postgres
POSTGRES_DBNAME: sentry
POSTGRES_DBUSER: sentry
POSTGRES_DBPASS: sentry
volumes:
- ~/sentry/data:/var/lib/postgresql/data
sentry:
image: sentry
depends_on:
- redis
- postgres
links:
- redis
- postgres
ports:
- 9000:9000
environment:
SENTRY_SECRET_KEY: '<SECRET-KEY>'
SENTRY_POSTGRES_HOST: postgres
SENTRY_DB_USER: postgres
SENTRY_DB_PASSWORD: postgres
SENTRY_REDIS_HOST: redis
SENTRY_SERVER_EMAIL: '<FROM-EMAIL>'
SENTRY_EMAIL_HOST: <EMAIL-HOST>
SENTRY_EMAIL_PORT: <EMAIL-PORT>
SENTRY_EMAIL_USER: '<USER-NAME>'
SENTRY_EMAIL_PASSWORD: '<USER-PASSWD>'
SENTRY_EMAIL_USE_TLS: 'true'
sentry-cron:
image: sentry
depends_on:
- redis
- postgres
command: "sentry run cron"
environment:
SENTRY_SECRET_KEY: '<SECRET-KEY>'
SENTRY_POSTGRES_HOST: postgres
SENTRY_DB_USER: postgres
SENTRY_DB_PASSWORD: postgres
SENTRY_REDIS_HOST: redis
SENTRY_SERVER_EMAIL: '<FROM-EMAIL>'
SENTRY_EMAIL_HOST: <EMAIL-HOST>
SENTRY_EMAIL_PORT: <EMAIL-PORT>
SENTRY_EMAIL_USER: '<USER-NAME>'
SENTRY_EMAIL_PASSWORD: '<USER-PASSWD>'
SENTRY_EMAIL_USE_TLS: 'true'
sentry-worker-1:
image: sentry
depends_on:
- redis
- postgres
command: "sentry run worker"
environment:
SENTRY_SECRET_KEY: '<SECRET-KEY>'
SENTRY_POSTGRES_HOST: postgres
SENTRY_DB_USER: postgres
SENTRY_DB_PASSWORD: postgres
SENTRY_REDIS_HOST: redis
SENTRY_SERVER_EMAIL: '<FROM-EMAIL>'
SENTRY_EMAIL_HOST: <EMAIL-HOST>
SENTRY_EMAIL_PORT: <EMAIL-PORT>
SENTRY_EMAIL_USER: '<USER-NAME>'
SENTRY_EMAIL_PASSWORD: '<USER-PASSWD>'
SENTRY_EMAIL_USE_TLS: 'true'
The containers running are,
root@sentry:~# docker ps
CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES
af70794fbd0d sentry "/entrypoint.sh run …" About a minute ago Up About a minute 0.0.0.0:9000->9000/tcp root_sentry_1
733862200ac9 sentry "/entrypoint.sh sent…" About a minute ago Up About a minute 9000/tcp root_sentry-cron_1
4d6bc8691010 sentry "/entrypoint.sh sent…" About a minute ago Up About a minute 9000/tcp root_sentry-worker-1_1
1cd4f132ccca redis "docker-entrypoint.s…" About a minute ago Up About a minute 6379/tcp root_redis_1
0c887f4b5ee0 postgres "docker-entrypoint.s…" About a minute ago Up About a minute 5432/tcp root_postgres_1
I found a config file in /etc/sentry
in sentry_1
container. Is the config file or am I missing up something?
Thank you for any help.
If you see the documentation they suggest to use custom image using .
sentry:onbuild
This image makes it easy to custom build your own Sentry instance by copying in a custom
config.yml
and/orsentry.conf.py
file and installing plugins fromrequirements.txt
.It's also possible to develop custom extensions within your onbuild package. If the build directory contains a
setup.py
file, this will also get installed.
See the official Sentry documentation for more information.
To create your custom
sentry:onbuild
package, simply do the following:Create a Dockerfile containing
FROM sentry:onbuild
In the same directory, add your customconfiguration files
. You can get copies of those files to use as templates from the docker-sentry GitHub repo. Build your image:docker build -t mysentry .
Run your custom image using mysentry instead of sentry.