Skip to content

Instantly share code, notes, and snippets.

@puppybits
Forked from andrefreitas/docker-compose.yml
Last active September 5, 2020 08:35
Show Gist options
  • Star 13 You must be signed in to star a gist
  • Fork 7 You must be signed in to fork a gist
  • Save puppybits/426319191bd4981cf6c8d9b6b06c6d46 to your computer and use it in GitHub Desktop.
Save puppybits/426319191bd4981cf6c8d9b6b06c6d46 to your computer and use it in GitHub Desktop.
sentry docker-compose
redis:
image: redis
postgres:
image: postgres
environment:
- POSTGRES_PASSWORD=sentry
- POSTGRES_USER=sentry
volumes:
- /var/lib/postgresql/data
sentry:
image: sentry
environment:
- SENTRY_SECRET_KEY=generate-secret-key
links:
- redis
- postgres
ports:
- "8081:9000"
celery-beat:
image: sentry
environment:
- SENTRY_SECRET_KEY=generate-secret-key
links:
- redis
- postgres
command: sentry celery beat
celery-worker:
image: sentry
environment:
- SENTRY_SECRET_KEY=generate-secret-key
links:
- redis
- postgres
command: sentry celery worker
# Generate Sentry secret key and update docker-compose.yaml
docker run --rm sentry generate-secret-key
# Databases
docker-compose up -d redis postgres sentry
# Initial setup
docker exec -it [SENTRY CONTAINER] sentry upgrade
# Run the remaining containers (Celery)
docker-compose up -d
# Run bash in sentry as root
docker exec -it --user=root [SENTRY CONTAINER] bash
@amcguign
Copy link

amcguign commented May 3, 2017

Thanks for sharing this! Just one change, I found I had to do sentry config generate-secret-key
-- https://docs.sentry.io/server/cli/config/generate-secret-key/

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