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:
Go to your dokku server and install following plugins:
- Install official postgresql plugin
sudo dokku plugin:install https://github.com/dokku/dokku-postgres.git postgres
- Install official redis plugin
sudo dokku plugin:install https://github.com/dokku/dokku-redis.git redis
- Create dokku app
dokku apps:create sentry
- Create postgresql db and link it to the app
dokku postgres:create sentry
dokku postgres:link sentry sentry
- Create redis instance and link it to the app
dokku redis:create sentry
dokku redis:link sentry sentry
- Add SENTRY_CONF to env vars
dokku config:set sentry SENTRY_CONF=./config
- Clone this repository locally
git clone https://github.com/Aluxian/dokku-sentry.git
cd dokku-sentry
- Add remote dokku
git remote add dokku dokku@yourserver:sentry
- Deploy app
git push dokku
After you have sucessfully deployed app to dokku, run following commands to finish installing sentry:
- Create database schema.
After migrations you will be prompted to create initial user.
ssh -t dokku@yourserver run sentry "sentry upgrade"
- 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!
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
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