{"id":26062019,"url":"https://github.com/okaeripoland/fat-sentry","last_synced_at":"2025-04-11T10:58:14.747Z","repository":{"id":119535887,"uuid":"464335255","full_name":"OkaeriPoland/fat-sentry","owner":"OkaeriPoland","description":"Don't you hate running 30 containers just for Sentry? We do.","archived":false,"fork":false,"pushed_at":"2023-04-07T16:52:45.000Z","size":18,"stargazers_count":4,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"master","last_synced_at":"2025-03-25T07:22:21.514Z","etag":null,"topics":["docker","docker-image","sentry"],"latest_commit_sha":null,"homepage":"","language":"Shell","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/OkaeriPoland.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2022-02-28T04:17:04.000Z","updated_at":"2024-10-22T20:34:11.000Z","dependencies_parsed_at":null,"dependency_job_id":"a4480faf-df34-4fe4-88a5-e3564c023877","html_url":"https://github.com/OkaeriPoland/fat-sentry","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/OkaeriPoland%2Ffat-sentry","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/OkaeriPoland%2Ffat-sentry/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/OkaeriPoland%2Ffat-sentry/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/OkaeriPoland%2Ffat-sentry/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/OkaeriPoland","download_url":"https://codeload.github.com/OkaeriPoland/fat-sentry/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248381643,"owners_count":21094524,"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","docker-image","sentry"],"created_at":"2025-03-08T15:49:05.402Z","updated_at":"2025-04-11T10:58:14.735Z","avatar_url":"https://github.com/OkaeriPoland.png","language":"Shell","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Deprecation notice\n\nAfter further testing we have decided that Sentry is not for us and migrated to [GlitchTip](https://glitchtip.com/), which allows us to achieve error collection over the same protocol, but with only about ~1 GB of memory used and negligible CPU usage in production, which is almost free in comparison to Sentry idling at ~6 GB and eating up to ~1 vCPU doing _nothing_. Fat Sentry will not be actively maintained, nor should you use it anyway.\n\n# Fat Sentry\n\nDon't you hate running 30 containers just for Sentry? We do. We really do!\nIntroducing Fat Sentry or as you may like to call it \"The Holy Sentry Stack\".\nThanks to the glorious DIND (Docker-in-Docker) technology, Sentry can now be run in a single container.\n\nDon't you want to replace that:\n```\nCONTAINER ID   IMAGE                                    COMMAND                  CREATED          STATUS                    PORTS                          NAMES\n21cd5b7d1d48   nginx:1.21.6-alpine                      \"/docker-entrypoint.…\"   10 minutes ago   Up 8 minutes              0.0.0.0:9000-\u003e80/tcp           sentry-self-hosted-nginx-1\n6b137dd26b23   getsentry/relay:22.2.0                   \"/bin/bash /docker-e…\"   10 minutes ago   Up 8 minutes              3000/tcp                       sentry-self-hosted-relay-1\n1bf0e18da9ca   getsentry/sentry:22.2.0                  \"/etc/sentry/entrypo…\"   10 minutes ago   Up 9 minutes              9000/tcp                       sentry-self-hosted-cron-1\n789b63721492   getsentry/sentry:22.2.0                  \"/etc/sentry/entrypo…\"   10 minutes ago   Up 9 minutes              9000/tcp                       sentry-self-hosted-subscription-consumer-transactions-1\nd06c9c0396ed   symbolicator-cleanup-self-hosted-local   \"/entrypoint.sh '55 …\"   10 minutes ago   Up 10 minutes             3021/tcp                       sentry-self-hosted-symbolicator-cleanup-1\n7ccd558bc2cc   getsentry/sentry:22.2.0                  \"/etc/sentry/entrypo…\"   10 minutes ago   Up 9 minutes              9000/tcp                       sentry-self-hosted-worker-1\n23d266f3ea7d   snuba-cleanup-self-hosted-local          \"/entrypoint.sh '*/5…\"   10 minutes ago   Up 9 minutes              1218/tcp                       sentry-self-hosted-snuba-transactions-cleanup-1\n887228ea5a0c   getsentry/sentry:22.2.0                  \"/etc/sentry/entrypo…\"   10 minutes ago   Up 9 minutes              9000/tcp                       sentry-self-hosted-subscription-consumer-events-1\nf749935ab237   getsentry/sentry:22.2.0                  \"/etc/sentry/entrypo…\"   10 minutes ago   Up 9 minutes (healthy)    9000/tcp                       sentry-self-hosted-web-1\nfc7e72d40d82   getsentry/sentry:22.2.0                  \"/etc/sentry/entrypo…\"   10 minutes ago   Up 9 minutes              9000/tcp                       sentry-self-hosted-post-process-forwarder-1\nbde01c288c74   snuba-cleanup-self-hosted-local          \"/entrypoint.sh '*/5…\"   10 minutes ago   Up 9 minutes              1218/tcp                       sentry-self-hosted-snuba-cleanup-1\n7dfda84bfcd1   getsentry/sentry:22.2.0                  \"/etc/sentry/entrypo…\"   10 minutes ago   Up 9 minutes              9000/tcp                       sentry-self-hosted-ingest-consumer-1\n005e1e3863f6   sentry-cleanup-self-hosted-local         \"/entrypoint.sh '0 0…\"   10 minutes ago   Up 9 minutes              9000/tcp                       sentry-self-hosted-sentry-cleanup-1\n924d33aa7927   getsentry/snuba:22.2.0                   \"./docker_entrypoint…\"   13 minutes ago   Up 9 minutes              1218/tcp                       sentry-self-hosted-snuba-sessions-consumer-1\neea148fdecc1   postgres:9.6                             \"/opt/sentry/postgre…\"   13 minutes ago   Up 10 minutes (healthy)   5432/tcp                       sentry-self-hosted-postgres-1\n68b7ccc0522a   getsentry/snuba:22.2.0                   \"./docker_entrypoint…\"   13 minutes ago   Up 9 minutes              1218/tcp                       sentry-self-hosted-snuba-subscription-consumer-events-1\nb959378abb79   getsentry/snuba:22.2.0                   \"./docker_entrypoint…\"   13 minutes ago   Up 9 minutes              1218/tcp                       sentry-self-hosted-snuba-transactions-consumer-1\n4073b43c0705   tianon/exim4                             \"docker-entrypoint.s…\"   13 minutes ago   Up 10 minutes             25/tcp                         sentry-self-hosted-smtp-1\n0c0d24c6ce9d   getsentry/symbolicator:0.4.2             \"/bin/bash /docker-e…\"   13 minutes ago   Up 10 minutes             3021/tcp                       sentry-self-hosted-symbolicator-1\nc6210d217f18   getsentry/snuba:22.2.0                   \"./docker_entrypoint…\"   13 minutes ago   Up 9 minutes              1218/tcp                       sentry-self-hosted-snuba-outcomes-consumer-1\n2d6e0e649e13   getsentry/snuba:22.2.0                   \"./docker_entrypoint…\"   13 minutes ago   Up 9 minutes              1218/tcp                       sentry-self-hosted-snuba-consumer-1\n129494f97ca7   getsentry/snuba:22.2.0                   \"./docker_entrypoint…\"   13 minutes ago   Up 9 minutes              1218/tcp                       sentry-self-hosted-snuba-subscription-consumer-transactions-1\n4828a4faa366   getsentry/snuba:22.2.0                   \"./docker_entrypoint…\"   13 minutes ago   Up 9 minutes              1218/tcp                       sentry-self-hosted-snuba-replacer-1\nde7b8e4c8993   getsentry/snuba:22.2.0                   \"./docker_entrypoint…\"   13 minutes ago   Up 9 minutes              1218/tcp                       sentry-self-hosted-snuba-api-1\nb3a6f914067f   memcached:1.6.9-alpine                   \"docker-entrypoint.s…\"   13 minutes ago   Up 10 minutes (healthy)   11211/tcp                      sentry-self-hosted-memcached-1\n85161eb7dd4e   confluentinc/cp-kafka:5.5.0              \"/etc/confluent/dock…\"   15 minutes ago   Up 9 minutes (healthy)    9092/tcp                       sentry-self-hosted-kafka-1\n84aacf46eafc   yandex/clickhouse-server:20.3.9.70       \"/entrypoint.sh\"         15 minutes ago   Up 10 minutes (healthy)   8123/tcp, 9000/tcp, 9009/tcp   sentry-self-hosted-clickhouse-1\n00b36fdf664f   confluentinc/cp-zookeeper:5.5.0          \"/etc/confluent/dock…\"   15 minutes ago   Up 10 minutes (healthy)   2181/tcp, 2888/tcp, 3888/tcp   sentry-self-hosted-zookeeper-1\n0d632bb2265b   redis:6.2.4-alpine                       \"docker-entrypoint.s…\"   15 minutes ago   Up 10 minutes (healthy)   6379/tcp                       sentry-self-hosted-redis-1\n```\n\nWith this pretty, single entry?:\n```\nCONTAINER ID   IMAGE                      COMMAND                  CREATED          STATUS          PORTS                                                 NAMES\nb7f6dd1661e1   okaeri/fat-sentry:22.2.0   \"/usr/local/bin/entr…\"   17 minutes ago   Up 17 minutes   2375/tcp, 0.0.0.0:9000-\u003e9000/tcp, :::9000-\u003e9000/tcp   sentry\n```\n\n## Run it!\n\nExpect about 10 minutes for clean startup and about a minute for the latter ones.\n\n```console\n# create volumes\ndocker volume create sentry-dind\ndocker volume create sentry-lib\n# create container\ndocker run --privileged \\\n -p 9000:9000 \\\n -e SENTRY_INIT_ADMIN_EMAIL=admin@example.com \\\n -e SENTRY_INIT_ADMIN_PASSWORD=admin \\\n --mount source=sentry-dind,target=/var/lib/docker \\\n --mount source=sentry-lib,target=/sentry \\\n -d --name sentry okaeri/fat-sentry:22.5.0-11\n```\n\n## Environment variables\n\nRemember: Only applicable for the first (install) startup!\n\n```dockerfile\nENV SENTRY_INIT_ADMIN_EMAIL=admin@example.com\nENV SENTRY_INIT_ADMIN_PASSWORD=admin\n```\n\n## Persistent storage\n\nCurrent persistent storage is a bit of crude as it requires storing the whole docker layer (binding volume on `/var/lib/docker`).\nMain reason for this is we don't have to track changes sentry makes in theirs volumes, also container recreation does \nnot require lengthy installation process each time.\n\n## Updating\n\nWhat? Do you really expect it to be that easy? It actually probably is, at least in theory:\n1) Backup your installation (best chances with quick backup).\n2) Test restore on current installation to check if everything is working.\n3) Remove fat-sentry container and volumes.\n4) Create fat-sentry container with new version of the image.\n5) Restore backup on the new version.\n\n## Backups\n\nAdapted to DIND from [Sentry help page on Self-Hosted Backup \u0026 Restore](https://develop.sentry.dev/self-hosted/backup/).\n\n### Quick Backup\n\n\u003e If you need a quick way to backup and restore your Sentry instance and you don't need historical event data, \n\u003e you can use the built in export and import commands. These commands will save and load all project and user \n\u003e data, but will not contain any event data.\n\n#### Backup\n```console\ndocker exec -it sentry /bin/bash -c 'docker-compose run --rm -T -e SENTRY_LOG_LEVEL=CRITICAL web export \u003e /sentry/sentry/backup.json'\ndocker exec -it sentry cat /sentry/sentry/backup.json \u003e backup.json\n```\n\nYou may need to remove non-json artifacts from the `backup.json` file, see e.g. [sentry#30396](https://github.com/getsentry/sentry/issues/30396).\n\n#### Restore\n\n```console\ndocker cp backup.json sentry:/sentry/sentry/backup.json\ndocker exec -it sentry /bin/bash -c 'docker-compose run --rm -T web import /etc/sentry/backup.json'\n```\n\nFailing with `django.core.serializers.base.DeserializationError`? Check your `backup.json` for non-json elements like `Updating certificates in /etc/ssl/certs...` and other log lines.\n\n### Full Backup\n\nYou will surely figure it out! Let us know if you do!\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fokaeripoland%2Ffat-sentry","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fokaeripoland%2Ffat-sentry","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fokaeripoland%2Ffat-sentry/lists"}