docker run --rm sentry config generate-secret-key
で SECRET_KEY を生成する- SECRET_KEY を環境変数にいれる
export SENTRY_SECRET_KEY="your generated secret key"
docker-compose up -d
でサービスあげるdocker-compose run --rm sentry sentry upgrade
で初期設定するdocker-compose restart
で再起動- Go http://localhost:9000 and get sentry!
-
-
Save watiko/03e65332c183cc634c3713d2253a825c to your computer and use it in GitHub Desktop.
Sentryをdocker-composeで。
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
version: "2" | |
services: | |
redis: | |
image: redis | |
postgres: | |
image: postgres:9.6 | |
environment: | |
POSTGRES_USER: sentry | |
POSTGRES_PASSWORD: secret | |
volumes: | |
- 'data:/var/lib/postgresql/data' | |
nginx: | |
image: nginx | |
ports: | |
- 9000:80 | |
links: | |
- sentry | |
volumes: | |
- './nginx.conf:/etc/nginx/conf.d/default.conf' | |
sentry: | |
image: sentry | |
links: | |
- redis | |
- postgres | |
environment: | |
SENTRY_SECRET_KEY: "${SENTRY_SECRET_KEY}" | |
SENTRY_POSTGRES_HOST: postgres | |
SENTRY_DB_USER: sentry | |
SENTRY_DB_PASSWORD: secret | |
SENTRY_REDIS_HOST: redis | |
SENTRY_SINGLE_ORGANIZATION: 'False' | |
volumes: | |
- 'files:/var/lib/sentry/files' | |
cron: | |
image: sentry | |
command: "sentry run cron" | |
links: | |
- redis | |
- postgres | |
environment: | |
SENTRY_SECRET_KEY: "${SENTRY_SECRET_KEY}" | |
SENTRY_POSTGRES_HOST: postgres | |
SENTRY_DB_USER: sentry | |
SENTRY_DB_PASSWORD: secret | |
SENTRY_REDIS_HOST: redis | |
volumes: | |
- 'files:/var/lib/sentry/files' | |
worker: | |
image: sentry | |
command: "sentry run worker" | |
links: | |
- redis | |
- postgres | |
environment: | |
SENTRY_SECRET_KEY: "${SENTRY_SECRET_KEY}" | |
SENTRY_POSTGRES_HOST: postgres | |
SENTRY_DB_USER: sentry | |
SENTRY_DB_PASSWORD: secret | |
SENTRY_REDIS_HOST: redis | |
volumes: | |
- 'files:/var/lib/sentry/files' | |
volumes: | |
data: | |
driver: 'local' | |
files: | |
driver: 'local' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
server { | |
listen 80; | |
server_name localhost; | |
proxy_set_header Host $http_host; | |
proxy_set_header X-Forwarded-Proto $scheme; | |
proxy_set_header X-Forwarded-For $remote_addr; | |
proxy_redirect off; | |
# keepalive + raven.js is a disaster | |
keepalive_timeout 0; | |
# use very aggressive timeouts | |
proxy_read_timeout 5s; | |
proxy_send_timeout 5s; | |
send_timeout 5s; | |
resolver_timeout 5s; | |
client_body_timeout 5s; | |
# buffer larger messages | |
client_max_body_size 5m; | |
client_body_buffer_size 100k; | |
location / { | |
proxy_pass http://sentry:9000; | |
add_header Strict-Transport-Security "max-age=31536000"; | |
} | |
} | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment