alex-min / dokku-sentry

Deploy Sentry 8.x on dokku with official postgres and redis plugins

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

dokku-sentry

Deploy Sentry 8.3.2 on dokku with sentry-github, postgres and redis.

This setup uses uWSGI as master process for all the child processes needed to properly run Sentry:

; uwsgi.ini
[uwsgi]
master = true
attach-daemon = sentry start
attach-daemon = sentry celery worker
attach-daemon = sentry celery beat

; Run nightly cron
cron = 0 3 -1 -1 -1 sentry cleanup --days=90

Instructions:

Install dokku plugins

Go to your dokku server and install following plugins:

  1. Install official postgresql plugin
sudo dokku plugin:install https://github.com/dokku/dokku-postgres.git postgres
  1. Install official redis plugin
sudo dokku plugin:install https://github.com/dokku/dokku-redis.git redis

Prepare dokku

  1. Create dokku app
dokku apps:create sentry
  1. Create postgresql db and link it to the app
dokku postgres:create sentry
dokku postgres:link sentry sentry
  1. Create redis instance and link it to the app
dokku redis:create sentry
dokku redis:link sentry sentry
  1. Add SENTRY_CONF to env vars
dokku config:set sentry SENTRY_CONF=./config

Clone and deploy

  1. Clone this repository locally
git clone https://github.com/Aluxian/dokku-sentry.git
cd dokku-sentry
  1. Add remote dokku
git remote add dokku dokku@yourserver:sentry
  1. Deploy app
git push dokku

Setup sentry

After you have sucessfully deployed app to dokku, run following commands to finish installing sentry:

  1. Create database schema.

After migrations you will be prompted to create initial user.

ssh -t dokku@yourserver run sentry "sentry upgrade"
  1. Create user (Optional). Use this step if you skipped it in the previous command.
ssh -t dokku@yourserver run sentry "sentry createuser"

VOILĂ€! Open your dokku app url, login and enjoy Sentry!

Customize sentry config

You can customise sentry.conf.py to fit your needs. However you can also override any config variable using dokku env vars:

SENTRY_EMAIL_HOST
SENTRY_EMAIL_PASSWORD
SENTRY_EMAIL_USER
SENTRY_EMAIL_PORT
SENTRY_EMAIL_USE_TLS
SENTRY_SERVER_EMAIL
SENTRY_MAILGUN_API_KEY
SENTRY_ENABLE_EMAIL_REPLIES
SENTRY_SMTP_HOSTNAME

Notes

To run sentry help and other commands:

dokku run sentry "sentry help"

To enable console prompt use -t

ssh -t dokku@yourserver run sentry "sentry"

If something goes wrong you can use dokku logs to debug:

dokku logs sentry -t

About

Deploy Sentry 8.x on dokku with official postgres and redis plugins


Languages

Language:Python 100.0%