Skip to content

Instantly share code, notes, and snippets.

@leizongmin
Forked from jensens/INSTALL.rst
Created February 14, 2017 07:45
Show Gist options
  • Save leizongmin/e7bf56515a53009a07a569d7b6029280 to your computer and use it in GitHub Desktop.
Save leizongmin/e7bf56515a53009a07a569d7b6029280 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