kapsali29 / sentry-setup

How to setup Sentry.io (open source) server in Docker Compose

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Sentry

How to setup Sentry.io (open source) server in Docker Compose

Sentry Architecture

Docker Compose

Redis

  • Service #1

Image:

redis:latest

Volumes:

- './data/sentry/redis/data:/data'

PostgreSQL

  • Service #2

Image:

postgres:latest

Environment:

POSTGRES_USER: sentry
POSTGRES_PASSWORD: 89PsZXyRStOT2
POSTGRES_DB: sentry

Volumes:

- './data/sentry/postgres:/var/lib/postgresql/data'

Sentry Base

  • 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

Sentry Cron

  • 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

Sentry Worker

  • 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

# Let's GO

Generate secret key

docker-compose run --rm sentry-base config generate-secret-key

And then set generated key to SENTRY_SECRET_KEY in .env.

Initialize database

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.

Service Start

docker-compose up -d

And open http://localhost:9000

About

How to setup Sentry.io (open source) server in Docker Compose

License:Apache License 2.0