2
0

Improve setup (#123)

* declare sentry volumes external

* move SENTRY_SECRET_KEY to .env file (not in git repo)

* ignore docker-compose.override.yml to allow extending
This commit is contained in:
eritikass 2018-10-17 20:02:22 +03:00 committed by Matt Robenolt
parent ea47a6283f
commit e21d9a3972
4 changed files with 21 additions and 15 deletions

3
.env.example Normal file
View File

@ -0,0 +1,3 @@
# Run `docker-compose run web config generate-secret-key`
# to get the SENTRY_SECRET_KEY value.
SENTRY_SECRET_KEY=

6
.gitignore vendored
View File

@ -65,5 +65,11 @@ target/
# pyenv
.python-version
# https://docs.docker.com/compose/extends/
docker-compose.override.yml
# env config
.env
*.tar
data/

View File

@ -14,18 +14,16 @@ will get you up and running in no time!
There may need to be modifications to the included `docker-compose.yml` file to accommodate your needs or your environment. These instructions are a guideline for what you should generally do.
1. `mkdir -p data/{sentry,postgres}` - Make our local database and sentry config directories.
This directory is bind-mounted with postgres so you don't lose state!
2. `docker-compose build` - Build and tag the Docker services
3. `docker-compose run --rm web config generate-secret-key` - Generate a secret key.
Add it to `docker-compose.yml` in `base` as `SENTRY_SECRET_KEY`.
4. `docker-compose run --rm web upgrade` - Build the database.
1. `docker volume create --name=sentry-data && docker volume create --name=sentry-postgres` - Make our local database and sentry volumes
Docker volumes have to be created manually, as they are declared as external to be more durable.
2. `cp -n .env.example .env` - create env config file
3. `docker-compose build` - Build and tag the Docker services
4. `docker-compose run --rm web config generate-secret-key` - Generate a secret key.
Add it to `.env` as `SENTRY_SECRET_KEY`.
5. `docker-compose run --rm web upgrade` - Build the database.
Use the interactive prompts to create a user account.
5. `docker-compose up -d` - Lift all services (detached/background mode).
6. Access your instance at `localhost:9000`!
Note that as long as you have your database bind-mounted, you should
be fine stopping and removing the containers without worry.
6. `docker-compose up -d` - Lift all services (detached/background mode).
7. Access your instance at `localhost:9000`!
## Securing Sentry with SSL/TLS

View File

@ -16,11 +16,8 @@ x-defaults: &defaults
- postgres
- memcached
- smtp
env_file: .env
environment:
# Run `docker-compose run web config generate-secret-key`
# to get the SENTRY_SECRET_KEY value.
SENTRY_SECRET_KEY: ''
SENTRY_MEMCACHED_HOST: memcached
SENTRY_REDIS_HOST: redis
SENTRY_POSTGRES_HOST: postgres
@ -64,4 +61,6 @@ services:
volumes:
sentry-data:
external: true
sentry-postgres:
external: true