From 2becd63ae5d2626c74829d5ae5fe4345ea083a5f Mon Sep 17 00:00:00 2001 From: Mario Loria Date: Thu, 13 Oct 2016 22:48:17 -0400 Subject: [PATCH 1/4] enhance readme --- README.md | 80 +++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 80 insertions(+) diff --git a/README.md b/README.md index bbfb82a..dfc3fd0 100644 --- a/README.md +++ b/README.md @@ -7,6 +7,86 @@ Official bootstrap for running your own [Sentry](https://sentry.io/) with [Docke * Docker 1.10.0+ * Compose 1.6.0+ _(optional)_ +## Up and Running + +Assuming you've just cloned this repository, the following steps +will get you up and running in no time! + +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 run web config generate-secret-key` - Generate a secret key. + Add it to `docker-compose.yml` in `base` as `SENTRY_SECRET_KEY`. +3. `docker-compose run web upgrade` - Build the database. + Use the interactive prompts to create a user account. +4. `docker-compose up -d` - Lift all services (detached/background mode). +5. 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. + +## Backing up postgres + +Following with the trend of containers, you could even add something like +[this](https://github.com/InAnimaTe/docker-postgres-s3-archive) to +backup postgres to an AWS S3 bucket: + +``` + postgresqlbackup: + image: inanimate/postgres-s3-archive:9.5 + restart: always + links: + - postgres:postgres + environment: + - "AWS_ACCESS_KEY_ID=PUTACCESSIDHERE" + - "AWS_SECRET_ACCESS_KEY=PUTSECRETKEYHERE" + - "BUCKET=s3://awesomebackupsbucket/sentry" + - "SYMMETRIC_PASSPHRASE=hahacanthaxme" + - "NAME_PREFIX=sentry-database-backup" + - "PGHOST=postgres" + - "PGPORT=5432" +``` + +This container runs `pgdump` to take snapshots of your database on a +certain time frame. You could also use other backup facilities on the +host which you're running the containers. + +## Reverse Proxying (SSL/TLS) + +The absolute easiest way to get SSL/TLS protecting your Sentry server is +to use [Caddy](https://caddyserver.com/). Caddy will handle automatic +SSL certificate obtainment and renewal from +[Let's Encrypt](https://letsencrypt.org/) for you. + +Here is an example `Caddyfile` configuration: + +``` +sentry.example.net { + proxy / web:9000 { + transparent + } + tls { + max_certs 1 + } +} +``` + +The above would work with a caddy entry in `docker-compose.yml` like: + +``` +caddy: + image: abiosoft/caddy:0.9.3 + restart: always + volumes: + - ./Caddyfile:/etc/Caddyfile + - ./caddydata:/root/.caddy + ports: + - "80:80" + - "443:443" + links: + - web + +``` + ## Resources * [Documentation](https://docs.sentry.io/server/installation/docker/) From 136d5e24bdc5cbc9c022888a336a983e62eb6d92 Mon Sep 17 00:00:00 2001 From: Mario Loria Date: Thu, 13 Oct 2016 23:16:43 -0400 Subject: [PATCH 2/4] cleanup extended config sections --- README.md | 65 ++++--------------------------------------------------- 1 file changed, 4 insertions(+), 61 deletions(-) diff --git a/README.md b/README.md index dfc3fd0..8b1f251 100644 --- a/README.md +++ b/README.md @@ -24,68 +24,11 @@ will get you up and running in no time! Note that as long as you have your database bind-mounted, you should be fine stopping and removing the containers without worry. -## Backing up postgres +## Securing Sentry with SSL/TLS -Following with the trend of containers, you could even add something like -[this](https://github.com/InAnimaTe/docker-postgres-s3-archive) to -backup postgres to an AWS S3 bucket: - -``` - postgresqlbackup: - image: inanimate/postgres-s3-archive:9.5 - restart: always - links: - - postgres:postgres - environment: - - "AWS_ACCESS_KEY_ID=PUTACCESSIDHERE" - - "AWS_SECRET_ACCESS_KEY=PUTSECRETKEYHERE" - - "BUCKET=s3://awesomebackupsbucket/sentry" - - "SYMMETRIC_PASSPHRASE=hahacanthaxme" - - "NAME_PREFIX=sentry-database-backup" - - "PGHOST=postgres" - - "PGPORT=5432" -``` - -This container runs `pgdump` to take snapshots of your database on a -certain time frame. You could also use other backup facilities on the -host which you're running the containers. - -## Reverse Proxying (SSL/TLS) - -The absolute easiest way to get SSL/TLS protecting your Sentry server is -to use [Caddy](https://caddyserver.com/). Caddy will handle automatic -SSL certificate obtainment and renewal from -[Let's Encrypt](https://letsencrypt.org/) for you. - -Here is an example `Caddyfile` configuration: - -``` -sentry.example.net { - proxy / web:9000 { - transparent - } - tls { - max_certs 1 - } -} -``` - -The above would work with a caddy entry in `docker-compose.yml` like: - -``` -caddy: - image: abiosoft/caddy:0.9.3 - restart: always - volumes: - - ./Caddyfile:/etc/Caddyfile - - ./caddydata:/root/.caddy - ports: - - "80:80" - - "443:443" - links: - - web - -``` +If you'd like to protect your Sentry install with SSL/TLS, there are +fantastic SSL/TLS proxies like [HAProxy](http://www.haproxy.org/) +and [Nginx](https://www.nginx.com/). ## Resources From 666e6175a704f4271c23a02555430a879de69509 Mon Sep 17 00:00:00 2001 From: Mario Loria Date: Fri, 14 Oct 2016 15:56:28 -0400 Subject: [PATCH 3/4] add rm to cleanup --- README.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 8b1f251..ae0e56a 100644 --- a/README.md +++ b/README.md @@ -14,9 +14,9 @@ will get you up and running in no time! 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 run web config generate-secret-key` - Generate a secret key. +2. `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`. -3. `docker-compose run web upgrade` - Build the database. +3. `docker-compose run --rm web upgrade` - Build the database. Use the interactive prompts to create a user account. 4. `docker-compose up -d` - Lift all services (detached/background mode). 5. Access your instance at `localhost:9000`! From f2cf2189a0217e3cb40acd7894e166c8f8f18621 Mon Sep 17 00:00:00 2001 From: Mario Loria Date: Sat, 15 Oct 2016 00:35:53 -0400 Subject: [PATCH 4/4] nginx.org no com --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index ae0e56a..844ac8f 100644 --- a/README.md +++ b/README.md @@ -28,7 +28,7 @@ be fine stopping and removing the containers without worry. If you'd like to protect your Sentry install with SSL/TLS, there are fantastic SSL/TLS proxies like [HAProxy](http://www.haproxy.org/) -and [Nginx](https://www.nginx.com/). +and [Nginx](http://nginx.org/). ## Resources