Skip to content

Instantly share code, notes, and snippets.

@denji
Forked from Cubixmeister/README.md
Last active October 17, 2024 15:35
Show Gist options
  • Save denji/b801f19d95b7d7910982c22bb1478f96 to your computer and use it in GitHub Desktop.
Save denji/b801f19d95b7d7910982c22bb1478f96 to your computer and use it in GitHub Desktop.
Simple Sentry docker-compose.yml
  1. Download docker-compose.yml to dir named sentry
  2. Change SENTRY_SECRET_KEY to random 32 char string
  3. Run docker-compose up -d
  4. Run docker-compose exec sentry sentry upgrade to setup database and create admin user
  5. (Optional) Run docker-compose exec sentry pip install sentry-slack if you want slack plugin, it can be done later
  6. Run docker-compose restart sentry
  7. Sentry is now running on public port 9000

Official Sentry integration/plugin

Sentry integration/plugin

version: '2'
volumes:
pgdb:
services:
redis:
image: redis
postgres:
image: postgres
environment:
POSTGRES_USER: sentry
POSTGRES_PASSWORD: sentry
POSTGRES_DB: sentry
volumes:
- pgdb:/var/lib/postgresql/data
sentry:
image: sentry
links:
- redis
- postgres
ports:
- 9000:9000
environment:
SENTRY_SECRET_KEY: '!!!SECRET!!!'
SENTRY_POSTGRES_HOST: postgres
SENTRY_DB_USER: sentry
SENTRY_DB_PASSWORD: sentry
SENTRY_REDIS_HOST: redis
cron:
image: sentry
links:
- redis
- postgres
command: "sentry run cron"
environment:
SENTRY_SECRET_KEY: '!!!SECRET!!!'
SENTRY_POSTGRES_HOST: postgres
SENTRY_DB_USER: sentry
SENTRY_DB_PASSWORD: sentry
SENTRY_REDIS_HOST: redis
worker:
image: sentry
links:
- redis
- postgres
command: "sentry run worker"
environment:
SENTRY_SECRET_KEY: '!!!SECRET!!!'
SENTRY_POSTGRES_HOST: postgres
SENTRY_DB_USER: sentry
SENTRY_DB_PASSWORD: sentry
SENTRY_REDIS_HOST: redis
server {
server_name sentry.example.com;
listen 80;
location / {
proxy_pass http://sentry:9000;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header Host $host;
}
}
@itJunky
Copy link

itJunky commented Jul 27, 2020

I need to configure mail server for send mentions from sentry. Where i can find config.yml? https://stackoverflow.com/questions/50344403/how-to-config-smtp-settings-in-sentry here is a solution without docker. But how i can do it in this docker way?

@Braintelligence
Copy link

@itJunky How about you look at the official Docker Hub Image readme? https://hub.docker.com/_/sentry

@bokink2099
Copy link

Hello guys, currently I have some issues when I invited new members its success. But when I try to log in using an account the new member can't log in. Did you guys know why?

@yainakrub
Copy link

yainakrub commented Aug 9, 2021

relation "sentry_option" does not exist at character 114

how to edit ?

image

@Qetbn
Copy link

Qetbn commented Nov 15, 2021

thanks! awesome hints

@alexxxxey
Copy link

Thank a lot! I think you can remove sections links:

@mumutu66
Copy link

how to use dedicate kafka...

@viotile
Copy link

viotile commented Dec 7, 2022

For steps 2:
Generate secret key by following command :
docker-compose run --rm sentry config generate-secret-key

@SeLub
Copy link

SeLub commented Feb 14, 2023

How to fix?

ERROR: relation "sentry_option" does not exist at character 114

@ggreeshma07
Copy link

how to fix this error:
failed to solve: rpc error: code = Unknown desc = failed to solve with frontend dockerfile.v0: failed to create LLB definition: base name (${BASE_IMAGE}) should not be blank

@thomanhphuc
Copy link

How to fix?

ERROR: relation "sentry_option" does not exist at character 114

docker exec -it sentry-sentry-1 sentry upgrade

@AlaaiDwidar
Copy link

i want to make sentry https , can anyone help

@Abhis9929
Copy link

hey I am getting the error in worker node.

I just deployed the above docker-compose file and changed the secret key and execute upgrade command but getting error in worker node.

Please help me to fix this error as getting from a long time.

worker-node

@des1roer
Copy link

on error

docker-sentry-1     |     return self.cursor.execute(sql, clean_bad_params(params))
docker-sentry-1     | ProgrammingError: ProgrammingError('relation "sentry_projectkey" does not exist\nLINE 1: ...te_limit_window", "sentry_projectkey"."data" FROM "sentry_pr...\n                                                             ^\n',)
docker-sentry-1     | SQL: SELECT "sentry_projectkey"."id", "sentry_projectkey"."project_id", "sentry_projectkey"."label", "sentry_projectkey"."public_key", "sentry_projectkey"."secret_key", "sentry_projectkey"."roles", "sentry_projectkey"."status", "sentry_projectkey"."date_added", "sentry_projectkey"."rate_limit_count", "sentry_projectkey"."rate_limit_window", "sentry_projectkey"."data" FROM "sentry_projectkey" WHERE ("sentry_projectkey"."project_id" = %s  AND "sentry_projectkey"."roles" =  "sentry_projectkey"."roles" | 1) LIMIT 1
docker-sentry-1     | 14:36:02 [ERROR] sentry_sdk.errors: Internal error in sentry_sdk

docker exec sentry bash

into container:

sentry upgrade

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment