diff --git a/.env b/.env new file mode 100644 index 0000000..e9cca0c --- /dev/null +++ b/.env @@ -0,0 +1,2 @@ +SENTRY_SECRET_KEY=z7pq%@lw6ip_ef0+%=m=jr9w5&-q8k0gdds1@!sbb(3(^j6gclSENTRY_SECRET_KEY=z7pq%@lw6ip_ef0+%=m=jr9w5&-q8k0gdds1@!sbb(3(^j6gcl +SENTRY_SECRET_KEY=z7pq%@lw6ip_ef0+%=m=jr9w5&-q8k0gdds1@!sbb(3(^j6gcl diff --git a/Dockerfile b/Dockerfile new file mode 100644 index 0000000..e5df0de --- /dev/null +++ b/Dockerfile @@ -0,0 +1 @@ +FROM sentry:9.1-onbuild diff --git a/Makefile b/Makefile new file mode 100644 index 0000000..342268b --- /dev/null +++ b/Makefile @@ -0,0 +1,13 @@ +install-sentry: + docker volume create --name=sentry-data + docker volume create --name=sentry-postgres + test -f .env && touch .env + docker-compose build + echo "SENTRY_SECRET_KEY=z7pq%@lw6ip_ef0+%=m=jr9w5&-q8k0gdds1@!sbb(3(^j6gcl" >> .env + docker-compose run --rm web upgrade + docker-compose up -d + +remove-sentry: + docker-compose down + docker volume rm sentry-data + docker volume rm sentry-postgres diff --git a/README.md b/README.md index ac03e73..523f036 100644 --- a/README.md +++ b/README.md @@ -3,6 +3,17 @@ eraven Erlang client for Sentry. +Development +----- + +Installation + + $ make install-sentry + +Clean-up + + $ make remove-sentry + Build ----- diff --git a/config.yml b/config.yml new file mode 100644 index 0000000..687bc9e --- /dev/null +++ b/config.yml @@ -0,0 +1,64 @@ +# While a lot of configuration in Sentry can be changed via the UI, for all +# new-style config (as of 8.0) you can also declare values here in this file +# to enforce defaults or to ensure they cannot be changed via the UI. For more +# information see the Sentry documentation. + +############### +# Mail Server # +############### + +# mail.backend: 'smtp' # Use dummy if you want to disable email entirely +# mail.host: 'localhost' +# mail.port: 25 +# mail.username: '' +# mail.password: '' +# mail.use-tls: false +# The email address to send on behalf of +# mail.from: 'root@localhost' + +# If you'd like to configure email replies, enable this. +# mail.enable-replies: false + +# When email-replies are enabled, this value is used in the Reply-To header +# mail.reply-hostname: '' + +# If you're using mailgun for inbound mail, set your API key and configure a +# route to forward to /api/hooks/mailgun/inbound/ +# mail.mailgun-api-key: '' + +################### +# System Settings # +################### + +# If this file ever becomes compromised, it's important to regenerate your a new key +# Changing this value will result in all current sessions being invalidated. +# A new key can be generated with `$ sentry config generate-secret-key` +system.secret-key: 'z7pq%@lw6ip_ef0+%=m=jr9w5&-q8k0gdds1@!sbb(3(^j6gcl' +system.url-prefix: 'http://localhost:9000' + +# The ``redis.clusters`` setting is used, unsurprisingly, to configure Redis +# clusters. These clusters can be then referred to by name when configuring +# backends such as the cache, digests, or TSDB backend. +# redis.clusters: +# default: +# hosts: +# 0: +# host: 127.0.0.1 +# port: 6379 + +################ +# File storage # +################ + +# Uploaded media uses these `filestore` settings. The available +# backends are either `filesystem` or `s3`. + +# filestore.backend: 'filesystem' +# filestore.options: +# location: '/tmp/sentry-files' + +# filestore.backend: 's3' +# filestore.options: +# access_key: 'AKIXXXXXX' +# secret_key: 'XXXXXXX' +# bucket_name: 's3-bucket-name' diff --git a/docker-compose.yaml b/docker-compose.yaml new file mode 100644 index 0000000..aa06c8d --- /dev/null +++ b/docker-compose.yaml @@ -0,0 +1,59 @@ +# NOTE: This docker-compose.yml is meant to be just an example of how +# you could accomplish this on your own. It is not intended to work in +# all use-cases and must be adapted to fit your needs. This is merely +# a guideline. + +# See docs.getsentry.com/on-premise/server/ for full +# instructions + +version: '3.4' + +x-defaults: &defaults + restart: unless-stopped + build: . + depends_on: + - redis + - postgres + - memcached + env_file: .env + environment: + SENTRY_MEMCACHED_HOST: memcached + SENTRY_REDIS_HOST: redis + SENTRY_POSTGRES_HOST: postgres + volumes: + - sentry-data:/var/lib/sentry/files + + +services: + memcached: + restart: unless-stopped + image: memcached:1.5-alpine + + redis: + restart: unless-stopped + image: redis:3.2-alpine + + postgres: + restart: unless-stopped + image: postgres:9.5 + volumes: + - sentry-postgres:/var/lib/postgresql/data + + web: + <<: *defaults + ports: + - '9000:9000' + + cron: + <<: *defaults + command: run cron + + worker: + <<: *defaults + command: run worker + +volumes: + sentry-data: + external: true + sentry-postgres: + external: true