Skip to content

Instantly share code, notes, and snippets.

@nightlyworker
Forked from jensens/INSTALL.rst
Created July 26, 2016 02:00
Show Gist options
  • Save nightlyworker/bcd60826597e5f839cc38c0c7edb74ba to your computer and use it in GitHub Desktop.
Save nightlyworker/bcd60826597e5f839cc38c0c7edb74ba to your computer and use it in GitHub Desktop.
sentry setup with docker-compose
version: '2'
volumes:
pgdb:
services:
redis:
image: redis
postgres:
image: 'eeacms/postgres:9.5'
environment:
POSTGRES_USER: postgres
POSTGRES_PASSWORD: postgres
POSTGRES_DBNAME: sentry
POSTGRES_DBUSER: sentry
POSTGRES_DBPASS: sentry
volumes:
- pgdb:/var/lib/postgresql/data
sentry:
image: sentry:latest
depends_on:
- redis
- postgres
links:
- redis
- postgres
ports:
- 9000:9000
environment:
SENTRY_SECRET_KEY: verysecret
SENTRY_POSTGRES_HOST: postgres
SENTRY_DB_USER: postgres
SENTRY_DB_PASSWORD: postgres
SENTRY_REDIS_HOST: redis
sentry_celery_beat:
image: sentry:latest
depends_on:
- redis
- postgres
command: "sentry celery beat --pidfile=/tmp/celerybeat-sentry.pid"
environment:
SENTRY_SECRET_KEY: verysecret
SENTRY_POSTGRES_HOST: postgres
SENTRY_DB_USER: postgres
SENTRY_DB_PASSWORD: postgres
SENTRY_REDIS_HOST: redis
sentry_celery_worker:
image: sentry:latest
depends_on:
- redis
- postgres
command: "sentry celery worker"
environment:
SENTRY_SECRET_KEY: verysecret
SENTRY_POSTGRES_HOST: postgres
SENTRY_DB_USER: postgres
SENTRY_DB_PASSWORD: postgres
SENTRY_REDIS_HOST: redis

In order to run this image do: docker-compose up -d to get all up. On first run DB initialization and initial user setup is done like so:

First start a bash in the container: docker-compose exec sentry /bin/bash. Then, inside bash, do sentry upgrade wait until it asks you for an inital user. When finished exit the bash.

When in doubt check with docker-compose ps if all went fine.

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