Skip to content

Instantly share code, notes, and snippets.

@tenken
Forked from dgoguerra/install-sentry.md
Created July 13, 2018 17:33
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save tenken/0fd0453997aab57ba1af737bc5d4eef5 to your computer and use it in GitHub Desktop.
Save tenken/0fd0453997aab57ba1af737bc5d4eef5 to your computer and use it in GitHub Desktop.
Install Sentry on-premise in Ubuntu 16.04 with Docker CE (Community Edition)

Install Docker

See: https://docs.docker.com/install/linux/docker-ce/ubuntu/#install-from-a-package

sudo apt-get update
sudo apt-get install apt-transport-https ca-certificates curl software-properties-common
curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo apt-key add -
sudo add-apt-repository "deb [arch=amd64] https://download.docker.com/linux/ubuntu $(lsb_release -cs) stable"
sudo apt-get update
sudo apt-get install docker-ce

Check the installation works running the hello-world container:

sudo docker run hello-world

Install Sentry

See: https://github.com/getsentry/onpremise

# install docker-compose
sudo apt-get install docker-compose

# download sentry repo
git clone https://github.com/getsentry/onpremise sentry
cd sentry/

# create database and sentry config directories
mkdir -p data/{sentry,postgres}

# generate SENTRY_SECRET_KEY
sudo docker-compose run --rm web config generate-secret-key

# update config
nano docker-compose.yml
nano config.yml

# run database migrations
sudo docker-compose run --rm web upgrade

# run services as daemons
sudo docker-compose up -d

To restart the running containers when needed:

sudo docker-compose restart
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment