<commit_before># docker-compose-sentry

Creates a secure sentry deployment using docker compose that uses letsencrypt
to generate some certs for you automatically.

## setup

replace all your example.coms with your actual domain / subdomain of your
sentry server.

disable the https portion of the nginx config until the certs are generated
with letsencrypt

copy `env.*.sample` to `env.*`, and fill in your variables

`docker-compose up -d`


## dependencies

To prep an Ubuntu 16.04 server, instructions valid as of May 3, 2017.

```
sudo apt-get update && sudo apt-get dist-upgrade -y
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
wget https://bootstrap.pypa.io/get-pip.py
sudo python3 get-pip.py 
sudo pip install docker-compose
mkdir sentry
git clone <this repo>
```
<commit_msg>more README cleanup<commit_after># docker-compose-sentry

Creates a slim and secure sentry deployment using docker compose that 
leverages letsencrypt to generate SSL certs for you automatically.

All persistent data is stored in the ./data subdirectory for letsencrypt,
postgresql, and redis.

Adds the `SENTRY_DISABLE_REGISTRATION` to `sentry.conf.py` that can be
configured via environment variables to more easily lock down registration on
private servers.


## dependencies

To prep an Ubuntu 16.04 server, instructions valid as of May 3, 2017.

```
sudo apt-get update && sudo apt-get dist-upgrade -y
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
wget https://bootstrap.pypa.io/get-pip.py
sudo python3 get-pip.py
sudo pip install docker-compose
mkdir sentry
git clone <this repo>
```

## setup

Have a domain name ready, with DNS already configured to point to this server.

Disable the `https` server portion of `nginx.conf` until the certs are
generated by the letsencrypt container, otherwise nginx will fail to start
because the certs are missing.

Copy `env.*.sample` to `env.*`, and fill in your variables, replacing
references to `example.com`.

Replace references to `example.com` in your nginx.conf as well.

The default mail configuration points to `smtp.sparkpostmail.com`, feel free to
use whatever else. Choose something where you have DKIM and SPF configured, so
your alert emails are most likely to be delivered.


```
docker-compose up -d
docker-compose run --rm sentry-web sentry upgrade
# follow prompts to configure superuser, etc.
```

Log in to your new sentry server at https://sentry.example.com

## notes

Please back up your data in the ./data directory, and your secret key off-site.
You don't want to lose those :grin:


{'fraction_non_alphanumeric': 0.08256, 'fraction_numerical': 0.00768, 'mean_word_length': 4.166942148760331, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 5, 'https://': 7, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 4, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '842598', 'n_tokens_mistral': 1000, 'n_tokens_neox': 902, 'n_words': 390}