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:
parent
ea47a6283f
commit
e21d9a3972
3
.env.example
Normal file
3
.env.example
Normal 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
6
.gitignore
vendored
@ -65,5 +65,11 @@ target/
|
|||||||
# pyenv
|
# pyenv
|
||||||
.python-version
|
.python-version
|
||||||
|
|
||||||
|
# https://docs.docker.com/compose/extends/
|
||||||
|
docker-compose.override.yml
|
||||||
|
|
||||||
|
# env config
|
||||||
|
.env
|
||||||
|
|
||||||
*.tar
|
*.tar
|
||||||
data/
|
data/
|
||||||
|
20
README.md
20
README.md
@ -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.
|
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.
|
1. `docker volume create --name=sentry-data && docker volume create --name=sentry-postgres` - Make our local database and sentry volumes
|
||||||
This directory is bind-mounted with postgres so you don't lose state!
|
Docker volumes have to be created manually, as they are declared as external to be more durable.
|
||||||
2. `docker-compose build` - Build and tag the Docker services
|
2. `cp -n .env.example .env` - create env config file
|
||||||
3. `docker-compose run --rm web config generate-secret-key` - Generate a secret key.
|
3. `docker-compose build` - Build and tag the Docker services
|
||||||
Add it to `docker-compose.yml` in `base` as `SENTRY_SECRET_KEY`.
|
4. `docker-compose run --rm web config generate-secret-key` - Generate a secret key.
|
||||||
4. `docker-compose run --rm web upgrade` - Build the database.
|
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.
|
Use the interactive prompts to create a user account.
|
||||||
5. `docker-compose up -d` - Lift all services (detached/background mode).
|
6. `docker-compose up -d` - Lift all services (detached/background mode).
|
||||||
6. Access your instance at `localhost:9000`!
|
7. 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.
|
|
||||||
|
|
||||||
## Securing Sentry with SSL/TLS
|
## Securing Sentry with SSL/TLS
|
||||||
|
|
||||||
|
@ -16,11 +16,8 @@ x-defaults: &defaults
|
|||||||
- postgres
|
- postgres
|
||||||
- memcached
|
- memcached
|
||||||
- smtp
|
- smtp
|
||||||
|
env_file: .env
|
||||||
environment:
|
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_MEMCACHED_HOST: memcached
|
||||||
SENTRY_REDIS_HOST: redis
|
SENTRY_REDIS_HOST: redis
|
||||||
SENTRY_POSTGRES_HOST: postgres
|
SENTRY_POSTGRES_HOST: postgres
|
||||||
@ -64,4 +61,6 @@ services:
|
|||||||
|
|
||||||
volumes:
|
volumes:
|
||||||
sentry-data:
|
sentry-data:
|
||||||
|
external: true
|
||||||
sentry-postgres:
|
sentry-postgres:
|
||||||
|
external: true
|
||||||
|
Reference in New Issue
Block a user