{"id":13617304,"url":"https://github.com/slafs/sentry-docker","last_synced_at":"2025-03-18T18:39:56.520Z","repository":{"id":19902054,"uuid":"23167258","full_name":"slafs/sentry-docker","owner":"slafs","description":"my approach for dockerizing Sentry","archived":false,"fork":false,"pushed_at":"2023-01-31T14:31:23.000Z","size":162,"stargazers_count":198,"open_issues_count":9,"forks_count":55,"subscribers_count":10,"default_branch":"master","last_synced_at":"2025-03-14T18:51:31.825Z","etag":null,"topics":["docker","python","sentry"],"latest_commit_sha":null,"homepage":"https://registry.hub.docker.com/u/slafs/sentry/","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/slafs.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":"CONTRIBUTING.md","funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2014-08-20T23:12:34.000Z","updated_at":"2024-11-21T21:44:25.000Z","dependencies_parsed_at":"2023-02-17T14:25:13.812Z","dependency_job_id":null,"html_url":"https://github.com/slafs/sentry-docker","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/slafs%2Fsentry-docker","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/slafs%2Fsentry-docker/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/slafs%2Fsentry-docker/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/slafs%2Fsentry-docker/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/slafs","download_url":"https://codeload.github.com/slafs/sentry-docker/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":244282967,"owners_count":20428103,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["docker","python","sentry"],"created_at":"2024-08-01T20:01:39.720Z","updated_at":"2025-03-18T18:39:56.476Z","avatar_url":"https://github.com/slafs.png","language":"Python","funding_links":[],"categories":["Python"],"sub_categories":[],"readme":"Sentry in Docker\n==================\n\n## Maintenance\n\nSince Sentry now [officially supports installation via Docker](https://github.com/getsentry/onpremise) -\n**this repository will no longer be updated**.\n\nMore info on Sentry's Docker installation https://docs.sentry.io/server/installation/docker/.\n\n## Warning about build tags\n\nLatest changes introduced some new build tags:\n\n* **8.0**  - current stable version (8.0.X)\n* **7.7**  - old stable version (7.7.4) - no longer updated\n* **7.6**  - old stable version (7.6.2) - no longer updated\n* **7.5**  - old stable version (7.5.6) - no longer updated\n* **7.4**  - old stable version (7.4.3) - no longer updated\n* **7.3**  - old stable version (7.3.2) - no longer updated\n* **7.2**  - old stable version (7.2.0) - no longer updated\n* **7.1**  - old stable version (7.1.4) - no longer updated\n* **7.0**  - older stable version (7.0.2) - no longer updated\n* **6.4** - even older stable version (6.4.4) - no longer updated\n* **dev** - current master on github (infrequent builds)\n* **latest** (the default one used earlier) - is now the same as **8.0**\n\nif you want to keep your builds same as before update your Dockerfiles and change\n```FROM slafs/sentry``` to ```FROM slafs/sentry:6.4```.\n\n[![Requirements Status](https://requires.io/github/slafs/sentry-docker/requirements.png?branch=master)](https://requires.io/github/slafs/sentry-docker/requirements/?branch=master)\n\nThis is my approach for running [Sentry](https://getsentry.com) inside [Docker](https://docker.com/).\nAlmost everything here is configurable via environment variables (including DATABASES and CACHES settings).\nIt can be easily configured to run with redis (cache, buffers and celery broker), postgres database, LDAP and REMOTE_USER authentication backends.\n\n## Quickstart\n\nto run a Sentry instance with default settings (with sqlite, locmem cache and no celery) run:\n\n```\ndocker run -d --name=sentry --volume=/tmp/sentry:/data -p 80:9000 -e SECRET_KEY=randomvalue -e SENTRY_URL_PREFIX=http://sentry.mydomain.com slafs/sentry\n```\n\nYou can visit now http://sentry.mydomain.com (assuming ``sentry.mydomain.com``\nis mapped to your docker host) and login with default credentials\n(username ``admin`` and password ``admin``) and create your first team and project.\n\nYour sqlite database file and gunicorn logs are available in ``/tmp/sentry`` directory.\n\n## Contributing\n\nTry not to fork this repo just to create your own Docker image with some\nminor tweak. Please open an [issue on GitHub](https://github.com/slafs/sentry-docker/issues)\nand maybe we can include your use case directly within this image :).\n\nYou can even write a test case for your feature ;). See\n[CONTRIBUTING.md](https://github.com/slafs/sentry-docker/blob/master/CONTRIBUTING.md).\n\nAlso feel free to give [feedback and comments](https://github.com/slafs/sentry-docker/issues)\nabout this image in general.\n\n## Advanced usage\n\nCopy the file with environment variables ``environment.example`` e.g ``cp environment.example environment``\nand after tweaking some values run sentry like this\n\n```\ndocker run -d --name=sentry --volume=/tmp/sentry:/data -p 80:9000 --env-file=environment slafs/sentry\n```\n\n``ENTRYPOINT`` for this image is a little wrapper script around default ``sentry`` executable.\nDefault ``CMD`` is ``start`` which runs ``upgrade`` command (initializes and upgrades the database)\nand creates a default administrator (superuser) and then runs a http service (as in ``sentry --config=... start``).\n\nAll commands and args are passed to the ``sentry`` executable. This means\n\n```\ndocker run [docker options] slafs/sentry --help\n```\n\nrefers to running:\n\n```\nsentry --config=/conf/sentry.conf.py --help\n```\n\ninside the container.\n\n### Admin user\n\nYou can specify a username, password and email address to create an initial sentry administrator.\n\nAdd those variables to your environment file\n\n```\nSENTRY_ADMIN_USERNAME=slafs\nSENTRY_ADMIN_PASSWORD=mysecretpass\nSENTRY_ADMIN_EMAIL=slafs@foo.com\n```\n\nSee [django docs](https://docs.djangoproject.com/en/1.5/ref/django-admin/#createsuperuser) for details about ``createsuperuser`` command.\n\nThe default administrator username is ``admin`` with password ``admin`` (and ``root@localhost`` as email adress).\n\n### Postgres\n\nIt is recommended to run your sentry instance with PostgreSQL database.\nTo link your sentry instance with a postgres container you can do it like this:\n\n0. Pull an official PostgreSQL image: ``docker pull postgres`` (if you haven't already).\n1. Run postgres container (from the official Docker image): ``docker run -d --name=postgres_container postgres``.\n2. Add ``DATABASE_URL=postgres://postgres:@postgresdb/postgres`` to environment file.\n3. Run sentry with linked postgres container: ```\ndocker run -d --name=sentry --volume=/tmp/sentry:/data -p 80:9000 --env-file=environment --link=postgres_container:postgresdb slafs/sentry```\n\nNotice that an alias for your linked postgres container (``postgresdb``) is the same as a postgres host in ``DATABASE_URL`` variable.\n\n``DATABASE_URL`` is a value that is parsed by an external app called [dj-database-url](https://github.com/kennethreitz/dj-database-url).\n\n\n### Redis\n\nRedis container can be used to improve sentry performance in number of ways. It can be used as a:\n\n* cache backend,\n* sentry buffers,\n* celery broker.\n\nYou can link your sentry instance with a redis container like this:\n\n0. Pull an official Redis image: ``docker pull redis`` (if you haven't already).\n1. Run redis container (from the official Docker image): ``docker run -d --name=redis_container redis``\n2. ```\ndocker run -d --name=sentry --volume=/tmp/sentry:/data -p 80:9000 --env-file=environment --link=postgres_container:postgresdb --link=redis_container:redis slafs/sentry```\n\nIf you want to use a different container alias for redis you should add ```SENTRY_REDIS_HOST=your_redis_alias``` to environment file.\n\n#### Cache with redis\n\nTo use a redis cache backend add ``CACHE_URL=hiredis://redis:6379/2``\n(make sure you won't have a trailing `/` in this setting)\nto environment file (where ``redis`` is the alias of your linked redis container).\nSee [django-cache-url](https://github.com/ghickman/django-cache-url) docs for available formats.\n\n#### Sentry buffers with redis\n\nTo use [sentry update buffers](https://docs.getsentry.com/on-premise/server/buffer/)\nwith redis you must add ``SENTRY_USE_REDIS_BUFFERS=True`` to environment file.\n\nIf you have many redis containers/hosts you can set a list of those hosts\nin ``SENTRY_REDIS_BUFFERS`` variable so they can be used by sentry.\nLike this: ``SENTRY_REDIS_BUFFERS=redis1:6380,redis2:6381``.\n\nSee [sentry docs](https://docs.getsentry.com/on-premise/server/buffer/#redis) for details about redis buffer.\n\n#### Celery with redis (and postgres)\n\nTo use Celery in sentry you must add ``CELERY_ALWAYS_EAGER=False`` to your environment file and run a celery worker like this:\n\n```\ndocker run -d --name=sentry_celery_worker --link=redis_container:redis --link=postgres_container:postgresdb --volume=/tmp/sentry:/data --env-file=environment slafs/sentry celery worker -B\n```\n\nYou can also set a different ``BROKER_URL`` via environment file by adding this:\n``SENTRY_BROKER_URL=redis://otherredishost:6379/1``\n\nYou can run as many celery worker containers as you want but remember that only one of them should be run with ``-B`` option.\n\nIf you're using default values for `CELERY_RESULT_SERIALIZER`, `CELERY_TASK_SERIALIZER`\nand `CELERY_ACCEPT_CONTENT` (default values support `pickle`)\nyou have to set `C_FORCE_ROOT` env var (to say `1`)\nto be able to run celery as a `root` user.\nYou can avoid this by setting those three to `json`.\nRefer to [Celery's serializer docs](docs.celeryproject.org/en/latest/userguide/security.html#serializers)\nfor more info about security implications of using `pickle` as a task serialization format.\n\n#### Time-series storage with redis\n\nTo have [time-series data](https://docs.getsentry.com/on-premise/server/tsdb/) you must add\n``SENTRY_USE_REDIS_TSDB=True`` to the environment file.\n\nBy default Redis time-series storage will use the Redis connection\ndefined by ``SENTRY_REDIS_HOST`` and ``SENTRY_REDIS_PORT``. Similarly\nto configuring buffers, you can set ``SENTRY_REDIS_TSDBS`` to a list\nof Redis servers: ``SENTRY_REDIS_TSDBS=redis1:6379,redis2:6380``\n\n### Email\n\nYou can configure all [email settings](https://docs.getsentry.com/on-premise/server/config/#smtp-server)\nby environment variables with ``SENTRY_`` prefix.\nYou have to also change an email backend and set it\nto ``SENTRY_EMAIL_BACKEND=django.core.mail.backends.smtp.EmailBackend`` or something similar.\n\n### LDAP\nWith this image You should be able to easily configure LDAP authentication for your Sentry instance.\nTo enable it add ``SENTRY_USE_LDAP=True`` to your ``environment`` file.\nThen set the needed options by adding env variables with ``LDAP_``\nprefix (see the table below). LDAP authentication backend is provided by\n[django-auth-ldap](https://pythonhosted.org/django-auth-ldap/).\n\n### REMOTE_USER\nTo enable authentication via REMOTE_USER, add ``SENTRY_USE_REMOTE_USER=True`` to your ``environment`` file.\nSee the ``AUTH_REMOTE_USER_*`` env variables below for further configuration.\n\n## Available environment variables\n\nRefer to [sentry documentation](https://docs.getsentry.com/on-premise/server/config/),\n[django documentation](https://docs.djangoproject.com/en/1.6/ref/settings/),\n[celery documentation](http://docs.celeryproject.org/en/latest/)\nand [django-auth-ldap documentation](https://pythonhosted.org/django-auth-ldap/reference.html)\nfor the meaning of each setting.\n\nEnvironment variable name       | Django/Sentry setting                         | Type | Default value                                         | Description\n--------------------------------|-----------------------------------------------|------|-------------------------------------------------------|------------------------------------------------------------------------\nSECRET_KEY                      | SECRET_KEY                                    |      | **REQUIRED!**                                         | set this to something random\nSENTRY_URL_PREFIX               | SENTRY_URL_PREFIX                             |      | **REQUIRED!**                                         | no trailing slash!\nDATABASE_URL                    | DATABASES                                     |      | sqlite:////data/sentry.db                             |\nCACHE_URL                       | CACHES                                        |      | locmem://                                             |\nCELERY_ALWAYS_EAGER             | CELERY_ALWAYS_EAGER                           | bool | True                                                  |\nSENTRY_BROKER_URL               | BROKER_URL                                    |      | ``redis://\u003cSENTRY_REDIS_HOST\u003e:\u003cSENTRY_REDIS_PORT\u003e/1`` |\nCELERY_RESULT_SERIALIZER        | CELERY_RESULT_SERIALIZER                      |      | ``pickle``                                            | You may want change it to ``json``. See http://docs.celeryproject.org/en/stable/configuration.html#celery-result-serializer\nCELERY_TASK_SERIALIZER          | CELERY_TASK_SERIALIZER                        |      | ``pickle``                                            | You may want change it to ``json``. See http://docs.celeryproject.org/en/stable/configuration.html#celery-task-serializer\nCELERY_ACCEPT_CONTENT           | CELERY_ACCEPT_CONTENT                         | list | ``pickle,json``                                       | Comma separated values. You may want change it to ``json``. See http://docs.celeryproject.org/en/stable/configuration.html#celery-accept-content\nSENTRY_REDIS_HOST               |                                               |      | redis                                                 |\nSENTRY_REDIS_PORT               |                                               | int  | 6379                                                  |\nSENTRY_WEB_HOST                 | SENTRY_WEB_HOST                               |      | 0.0.0.0                                               |\nSENTRY_WEB_PORT                 | SENTRY_WEB_PORT                               | int  | 9000                                                  |\nSENTRY_WORKERS                  | SENTRY_WEB_OPTIONS['workers']                 | int  | 3                                                     | the number of gunicorn workers\nSENTRY_USE_REDIS_BUFFERS        |                                               | bool | False                                                 |\nSENTRY_REDIS_BUFFERS            | SENTRY_REDIS_OPTIONS['hosts']*                | list | ``\u003cSENTRY_REDIS_HOST\u003e:\u003cSENTRY_REDIS_PORT\u003e``           | comma separated list of redis hosts (``host1:port1,host2:port2,...``)\nSENTRY_USE_REDIS_TSDB           |                                               | bool | False                                                 |\nSENTRY_REDIS_TSDBS              | SENTRY_TSDB_OPTIONS['hosts']*                 | list | ``\u003cSENTRY_REDIS_HOST\u003e:\u003cSENTRY_REDIS_PORT\u003e``           | comma separated list of redis hosts (``host1:port1,host2:port2,...``)\nSENTRY_EMAIL_BACKEND            | EMAIL_BACKEND                                 |      | django.core.mail.backends.console.EmailBackend        |\nSENTRY_EMAIL_HOST               | EMAIL_HOST                                    |      | localhost                                             |\nSENTRY_EMAIL_HOST_PASSWORD      | EMAIL_HOST_PASSWORD                           |      | ''                                                    |\nSENTRY_EMAIL_HOST_USER          | EMAIL_HOST_USER                               |      | ''                                                    |\nSENTRY_EMAIL_PORT               | EMAIL_PORT                                    | int  | 25                                                    |\nSENTRY_EMAIL_USE_TLS            | EMAIL_USE_TLS                                 | bool | False                                                 |\nSENTRY_SERVER_EMAIL             | SERVER_EMAIL                                  |      | root@localhost                                        |\nSENTRY_ALLOW_REGISTRATION       | SENTRY_ALLOW_REGISTRATION                     | bool | False                                                 |\nSENTRY_ADMIN_USERNAME           |                                               |      | admin                                                 | username for Sentry's superuser\nSENTRY_ADMIN_PASSWORD           |                                               |      | admin                                                 | password for Sentry's superuser\nSENTRY_ADMIN_EMAIL              | SENTRY_ADMIN_EMAIL                            |      | root@localhost                                        | email address for Sentry's superuser and a setting as of Sentry 7.3\nSENTRY_DATA_DIR                 |                                               |      | ``/data``                                             | custom location for logs and sqlite database\nTWITTER_CONSUMER_KEY            | TWITTER_CONSUMER_KEY                          |      | ''                                                    |\nTWITTER_CONSUMER_SECRET         | TWITTER_CONSUMER_SECRET                       |      | ''                                                    |\nFACEBOOK_APP_ID                 | FACEBOOK_APP_ID                               |      | ''                                                    |\nFACEBOOK_API_SECRET             | FACEBOOK_API_SECRET                           |      | ''                                                    |\nGOOGLE_OAUTH2_CLIENT_ID         | GOOGLE_OAUTH2_CLIENT_ID                       |      | ''                                                    |\nGOOGLE_OAUTH2_CLIENT_SECRET     | GOOGLE_OAUTH2_CLIENT_SECRET                   |      | ''                                                    |\nGITHUB_APP_ID                   | GITHUB_APP_ID                                 |      | ''                                                    |\nGITHUB_API_SECRET               | GITHUB_API_SECRET                             |      | ''                                                    |\nTRELLO_API_KEY                  | TRELLO_API_KEY                                |      | ''                                                    |\nTRELLO_API_SECRET               | TRELLO_API_SECRET                             |      | ''                                                    |\nBITBUCKET_CONSUMER_KEY          | BITBUCKET_CONSUMER_KEY                        |      | ''                                                    |\nBITBUCKET_CONSUMER_SECRET       | BITBUCKET_CONSUMER_SECRET                     |      | ''                                                    |\nSENTRY_USE_LDAP                 |                                               | bool | False                                                 | if set to ``False`` all other LDAP settings are discarded\nLDAP_SERVER                     | AUTH_LDAP_SERVER_URI                          |      | ``ldap://localhost``                                  |\nLDAP_BIND_DN                    | AUTH_LDAP_BIND_DN                             |      | ''                                                    |\nLDAP_BIND_PASSWORD              | AUTH_LDAP_BIND_PASSWORD                       |      | ''                                                    |\nLDAP_USER_DN                    | AUTH_LDAP_USER_SEARCH*                        |      | **REQUIRED!** if you want to use LDAP auth            | first argument of LDAPSearch (base_dn) when searching for users\nLDAP_USER_FILTER                | AUTH_LDAP_USER_SEARCH*                        |      | ``(\u0026(objectClass=inetOrgPerson)(cn=%(user)s))``       | third argument of LDAPSearch (filterstr) when searching for users\nLDAP_GROUP_DN                   | AUTH_LDAP_GROUP_SEARCH*                       |      | ''                                                    | first argument of LDAPSearch (base_dn) when searching for groups\nLDAP_GROUP_FILTER               | AUTH_LDAP_GROUP_SEARCH*                       |      | ``(objectClass=groupOfUniqueNames)``                  | third argument of LDAPSearch (filterstr) when searching for groups\nLDAP_GROUP_TYPE                 | AUTH_LDAP_GROUP_TYPE*                         |      | ''                                                    | if set to 'groupOfUniqueNames' then ``AUTH_LDAP_GROUP_TYPE = GroupOfUniqueNamesType()``, if set to 'posixGroup' then ``AUTH_LDAP_GROUP_TYPE = PosixGroupType()``.\nLDAP_REQUIRE_GROUP              | AUTH_LDAP_REQUIRE_GROUP                       |      | None                                                  |\nLDAP_DENY_GROUP                 | AUTH_LDAP_DENY_GROUP                          |      | None                                                  |\nLDAP_MAP_FIRST_NAME             | AUTH_LDAP_USER_ATTR_MAP['first_name']         |      | ``givenName``                                         |\nLDAP_MAP_LAST_NAME              | AUTH_LDAP_USER_ATTR_MAP['last_name']          |      | ``sn``                                                |\nLDAP_MAP_MAIL                   | AUTH_LDAP_USER_ATTR_MAP['email']              |      | ``mail``                                              |\nLDAP_GROUP_ACTIVE               | AUTH_LDAP_USER_FLAGS_BY_GROUP['is_active']    |      | ''                                                    |\nLDAP_GROUP_STAFF                | AUTH_LDAP_USER_FLAGS_BY_GROUP['is_staff']     |      | ''                                                    |\nLDAP_GROUP_SUPERUSER            | AUTH_LDAP_USER_FLAGS_BY_GROUP['is_superuser'] |      | ''                                                    |\nLDAP_FIND_GROUP_PERMS           | AUTH_LDAP_FIND_GROUP_PERMS                    | bool | False                                                 |\nLDAP_CACHE_GROUPS               | AUTH_LDAP_CACHE_GROUPS                        | bool | True                                                  |\nLDAP_GROUP_CACHE_TIMEOUT        | AUTH_LDAP_GROUP_CACHE_TIMEOUT                 | int  | 3600                                                  |\nLDAP_LOGLEVEL                   |                                               |      | ``DEBUG``                                             | django_auth_ldap logger level (other values: NOTSET (to disable), INFO, WARNING, ERROR or CRITICAL)\nSENTRY_USE_REMOTE_USER          |                                               | bool | False                                                 | use `REMOTE_USER` for authentication; useful if you're behind your own SSO\nAUTH_REMOTE_USER_HEADER         |                                               |      | None                                                  | if set, this value will be read from the request object instead of `REMOTE_USER`, as described [here](https://docs.djangoproject.com/en/1.7/howto/auth-remote-user/). For example: `HTTP_X_SSO_USERNAME`\nSENTRY_INITIAL_TEAM             |                                               |      |                                                       | convenient in development - creates an initial team inside Sentry DB with the given name\nSENTRY_INITIAL_PROJECT          |                                               |      |                                                       | convenient in development - creates an initial project for the above team (owner for both is the created admin )\nSENTRY_INITIAL_PLATFORM         |                                               |      | 'python'                                              | convenient in development - indicates a platform for the above initial project\nSENTRY_INITIAL_KEY              |                                               |      |                                                       | convenient in development - updates a key for the above project so you can set DSN in your client. (e.g. ``public:secret``)\nSENTRY_INITIAL_DOMAINS          |                                               |      |                                                       | convenient in development - updates allowed domains for usage with raven-js e.g. ``example.com *.example.com`` (space separated)\nSENTRY_SCRIPTS_DIR              |                                               |      |                                                       | convenient in development - required for the wrapper and non Docker scenarios (you can leave this empty)\nSENTRY_SECURE_PROXY_SSL_HEADER  | SECURE_PROXY_SSL_HEADER                       |      | None                                                  | when running with SSL set this to 'HTTP_X_FORWARDED_PROTO,https' (comma separated)\nSENTRY_USE_X_FORWARDED_HOST     | USE_X_FORWARDED_HOST                          | bool | False                                                 | when running behind proxy or with SSL set this to 'True'\nSENTRY_ALLOW_ORIGIN             | SENTRY_ALLOW_ORIGIN                           |      | None                                                  | allows JavaScript clients to submit cross-domain error reports. (e.g. ``\"http://foo.example\"``\nSENTRY_BEACON                   | SENTRY_BEACON                                 | bool | True                                                  | controls sending statistics to https://www.getsentry.com/remote/beacon/\nSENTRY_PUBLIC                   | SENTRY_PUBLIC                                 | bool | False                                                 | Should Sentry make all data publicly accessible? This should only be used if you’re installing Sentry behind your company’s firewall.\nSENTRY_DOCKER_DO_DB_CHECK       |                                               | any  |                                                       | if this variable is set (to any non-empty value) the script (``sentry_run``) will check if DB is accessible before running migrations/service - helps to avoid nasty race conditions\n\n\n## Extending the image ##\n\nIf your use case is out the scope of this generic image, you can\nextend this image to include your custom packages, configuration etc. and\nstill be able to take advantage of all features here. All you need to do is create\nyour own image based on this one.\n\nFor example to install and use a plugin like sentry-github\nand/or change a setting that isn't managed by this image you can have a following\nconfig script ``my_custom_settings.py``:\n\n    # get all the configuration from the original image\n    from sentry_docker_conf import *  # noqa\n\n    # change some settings - for example the port\n    # (of course you can do this also by setting environment variable ``SENTRY_WEB_PORT``)\n    SENTRY_WEB_PORT = 5000\n\n    # configure sentry-github\n    GITHUB_APP_ID = 'GitHub Application Client ID'\n    GITHUB_API_SECRET = 'GitHub Application Client Secret'\n    GITHUB_EXTENDED_PERMISSIONS = ['repo']\n    ...\n\nand a ``Dockerfile`` similar to this:\n\n    # inherit from this image\n    FROM slafs/sentry\n\n    # who's the boss? :)\n    MAINTAINER me\n\n    # install your extra dependencies e.g. sentry-github\n    # (there are some dependency issues with redis)\n    RUN pip install -U sentry-github \"redis\u003c2.9.0\"\n\n    # add your custom settings file\n    ADD my_custom_settings.py /conf/\n\n    # make sentry_docker_conf module importable from your custom script\n    ENV PYTHONPATH /conf\n\n    # use your custom settings file as a default config file for sentry to use\n    ENV SENTRY_CONF_FILE /conf/my_custom_settings.py\n\n    # expose the new port\n    EXPOSE 5000\n\n\nBuild your image:\n\n    docker build -t my_custom_sentry_image .\n\nNow you can run your sentry instance just like before but with different image.\nSo for example this:\n\n```\ndocker run -d --name=... --volume=... -p 80:9000 -e SECRET_KEY=... -e SENTRY_URL_PREFIX=http://... slafs/sentry\n```\n\nbecomes this:\n\n```\ndocker run -d --name=... --volume=... -p 80:5000 -e SECRET_KEY=... -e SENTRY_URL_PREFIX=http://... my_custom_sentry_image\n```\n\n### Image for development\n\nIf you'd like to use a preconfigured image just to be able to use it in your\ndevelopment process (for example to check if your application is properly logging to sentry)\nyou can also create your own image for this.\n\nFollowing ``Dockerfile`` should be OK::\n\n    # inherit from this image\n    FROM slafs/sentry\n\n    # who's the boss? :)\n    MAINTAINER me\n\n    ENV SECRET_KEY somethingsecret\n    ENV SENTRY_URL_PREFIX http://sentry.domain.com\n\n    ENV SENTRY_INITIAL_TEAM testteam\n    ENV SENTRY_INITIAL_PROJECT testproject\n    ENV SENTRY_INITIAL_KEY public:secret\n\n    RUN /usr/local/bin/sentry_run prepare\n\nNow after building it (like in the above example) ``my_custom_sentry_image`` can\nbe started without any env variables and you can use ``http://public:secret@sentry.domain.com:9000/2``\nas your ``SENTRY_DSN`` setting for raven (or other sentry client of your choice).\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fslafs%2Fsentry-docker","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fslafs%2Fsentry-docker","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fslafs%2Fsentry-docker/lists"}