How to setup Sentry.io (open source) server in Docker Compose
- Service #1
Image:
redis:latest
Volumes:
- './data/sentry/redis/data:/data'
- Service #2
Image:
postgres:latest
Environment:
POSTGRES_USER: sentry
POSTGRES_PASSWORD: 89PsZXyRStOT2
POSTGRES_DB: sentry
Volumes:
- './data/sentry/postgres:/var/lib/postgresql/data'
- Service #3
Image:
sentry:latest
Ports:
- '9000:9000'
Environment File:
.env
depends_on:
- sentry-redis
- sentry-postgres
Volumes:
- './data/sentry/sentry:/var/lib/sentry/files'
.env:
SENTRY_SECRET_KEY==(r&r()bsat53avyq5a-4tpe8eibsfa5m6ut@42afjdkx@5*s
SENTRY_POSTGRES_HOST=sentry-postgres
SENTRY_POSTGRES_PORT=5432
SENTRY_DB_NAME=sentry
SENTRY_DB_USER=sentry
SENTRY_DB_PASSWORD=a6HlxEp72ONSg
SENTRY_REDIS_HOST=sentry-redis
SENTRY_REDIS_PORT=6379
- Service #4
Image:
sentry:latest
Environment File:
.env
depends_on:
- sentry-redis
- sentry-postgres
Volumes:
- './data/sentry/sentry:/var/lib/sentry/files'
Command:
sentry run cron
- Service #5
Image:
sentry:latest
Environment File:
.env
depends_on:
- sentry-redis
- sentry-postgres
Volumes:
- './data/sentry/sentry:/var/lib/sentry/files'
Command:
sentry run worker
docker-compose run --rm sentry-base config generate-secret-key
And then set generated key to SENTRY_SECRET_KEY
in .env
.
If this is a new database, you'll need to run upgrade
.
docker-compose run --rm sentry-base upgrade
And create an initial user, if you need.
docker-compose up -d
And open http://localhost:9000