Skip to content

Instantly share code, notes, and snippets.

@chrislawlor
Forked from denji/README.md
Last active September 2, 2019 21:52
Show Gist options
  • Save chrislawlor/1aed8bf33fac92d5d801be09ab9e1a5a to your computer and use it in GitHub Desktop.
Save chrislawlor/1aed8bf33fac92d5d801be09ab9e1a5a 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:
- 9001:9000
environment:
SENTRY_SECRET_KEY: ${SECRET_KEY}
SENTRY_POSTGRES_HOST: postgres
SENTRY_DB_USER: sentry
SENTRY_DB_PASSWORD: sentry
SENTRY_REDIS_HOST: redis
depends_on:
- redis
- postgres
cron:
image: sentry
links:
- redis
- postgres
command: "sentry run cron"
environment:
SENTRY_SECRET_KEY: ${SECRET_KEY}
SENTRY_POSTGRES_HOST: postgres
SENTRY_DB_USER: sentry
SENTRY_DB_PASSWORD: sentry
SENTRY_REDIS_HOST: redis
depends_on:
- redis
- postgres
worker:
image: sentry
links:
- redis
- postgres
command: "sentry run worker"
environment:
SENTRY_SECRET_KEY: ${SECRET_KEY}
SENTRY_POSTGRES_HOST: postgres
SENTRY_DB_USER: sentry
SENTRY_DB_PASSWORD: sentry
SENTRY_REDIS_HOST: redis
depends_on:
- redis
- postgres
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;
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment