Skip to content

Deploy your own instance of Sentry onto Dokku!

Notifications You must be signed in to change notification settings

PythonicCafe/dokku-sentry

This branch is 12 commits ahead of mimischi/dokku-sentry:master.

Folders and files

NameName
Last commit message
Last commit date

Latest commit

1066ee4 · Feb 27, 2025

History

92 Commits
Sep 11, 2017
Feb 21, 2025
Feb 27, 2025
Feb 21, 2025
Feb 21, 2025
Sep 10, 2017
Feb 27, 2025
Feb 21, 2025
Feb 21, 2025
Feb 27, 2025
Feb 21, 2025
Feb 27, 2025
Nov 7, 2016
Feb 20, 2025
Feb 27, 2025

Repository files navigation

Project logo

Sentry version Dokku version

Deploy Sentry on Dokku

Deploy your own instance of Sentry onto Dokku!

This project is a clone of the official bootstrap repository (getsentry/onpremise) with a few modifications for a seamless deploy to Dokku.

What you get

This repository will deploy Sentry 9.1.2. It has been tested with Dokku 0.10+.

Requirements

Setup

First, copy the block below and change de variables for values of your liking. Then, execute in the Dokku server.

export APP_NAME="sentry"
export APP_DOMAIN="sentry.example.com"
export LETSENCRYPT_EMAIL="admin@example.com"
export PG_NAME="pg_${APP_NAME}"
export REDIS_NAME="redis_${APP_NAME}"
export MEMCACHED_NAME="memcached_${APP_NAME}"
export EMAIL_HOST="smtp.example.com"
export EMAIL_PASSWORD="<your-mail-password>"
export EMAIL_PORT="25"
export EMAIL_USERNAME="<your-username>"
export EMAIL_USE_TLS="True"
export EMAIL_SENDER="sentry@example.com"
export EMAIL_USE_SSL="False"
export HOST_STORAGE_PATH="/var/lib/dokku/data/storage/${APP_NAME}"
export CONTAINER_STORAGE_PATH="/data"

dokku apps:create "$APP_NAME"
dokku domains:set "$APP_NAME" $APP_DOMAIN
dokku config:set --no-restart "$APP_NAME" SENTRY_SECRET_KEY=$(echo `openssl rand -base64 64` | tr -d ' ')
dokku config:set --no-restart "$APP_NAME" SENTRY_EMAIL_HOST=$EMAIL_HOST
dokku config:set --no-restart "$APP_NAME" SENTRY_EMAIL_PASSWORD=$EMAIL_PASSWORD
dokku config:set --no-restart "$APP_NAME" SENTRY_EMAIL_PORT=$EMAIL_PORT
dokku config:set --no-restart "$APP_NAME" SENTRY_EMAIL_USER=$EMAIL_USERNAME
dokku config:set --no-restart "$APP_NAME" SENTRY_EMAIL_USE_TLS=$EMAIL_USE_TLS
dokku config:set --no-restart "$APP_NAME" SENTRY_SERVER_EMAIL=$EMAIL_SENDER
dokku config:set --no-restart "$APP_NAME" SENTRY_USE_SSL=$EMAIL_USE_SSL
dokku config:set --no-restart "$APP_NAME" SENTRY_FILESTORE_DIR=$CONTAINER_STORAGE_PATH

dokku postgres:create "$PG_NAME" --image-version 17-bookworm
dokku postgres:link "$PG_NAME" "$APP_NAME"
dokku redis:create "$REDIS_NAME" --image-version 5.0.14-alpine
dokku redis:link "$REDIS_NAME" "$APP_NAME"
dokku memcached:create "$MEMCACHED_NAME" --image-version 1.5.20
dokku memcached:link "$MEMCACHED_NAME" "$APP_NAME"

mkdir -p "$HOST_STORAGE_PATH"
chown -R 1000:1000 "$HOST_STORAGE_PATH"  # `django` user inside container have UID=GID=1000
dokku storage:mount $APP_NAME "$HOST_STORAGE_PATH:$CONTAINER_STORAGE_PATH"

Now, clone this repository on your marchine, setup the Dokku server as remote and execute the first deploy:

git clone git@github.com:PythonicCafe/dokku-sentry.git
cd dokku-sentry
git remote add dokku dokku@<your-dokku-server>:<app-name>
git push dokku main

Now, go back to the server and execute:

dokku letsencrypt:set "$APP_NAME" email "$LETSENCRYPT_EMAIL"
dokku letsencrypt:enable "$APP_NAME"

And, finally, create a user:

dokku run "$APP_NAME" sentry createuser

Your Sentry instance is now running and configured!

About

Deploy your own instance of Sentry onto Dokku!

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Python 71.2%
  • Makefile 13.5%
  • Dockerfile 9.9%
  • Shell 4.6%
  • Procfile 0.8%