docker-compose
version: '2'
volumes:
pgdb:
services:
redis:
image: redis:3.2.9-alpine
postgres:
image: postgres:9.6
environment:
POSTGRES_USER: sentry
POSTGRES_PASSWORD: sentry
POSTGRES_DBNAME: sentry
POSTGRES_DBUSER: sentry
POSTGRES_DBPASS: sentry
volumes:
- pgdb:/var/lib/postgresql/data
sentry:
image: sentry:8.15
links:
- redis
- postgres
ports:
- 9000:9000
environment:
SENTRY_SECRET_KEY: '!!!SECRET!!!'
SENTRY_POSTGRES_HOST: postgres
SENTRY_DB_USER: sentry
SENTRY_DB_PASSWORD: sentry
SENTRY_REDIS_HOST: redis
cron:
image: sentry:8.15
links:
- redis
- postgres
command: "sentry run cron"
environment:
SENTRY_SECRET_KEY: '!!!SECRET!!!'
SENTRY_POSTGRES_HOST: postgres
SENTRY_DB_USER: sentry
SENTRY_DB_PASSWORD: sentry
SENTRY_REDIS_HOST: redis
worker:
image: sentry:8.15
links:
- redis
- postgres
command: "sentry run worker"
environment:
SENTRY_SECRET_KEY: '!!!SECRET!!!'
SENTRY_POSTGRES_HOST: postgres
SENTRY_DB_USER: sentry
SENTRY_DB_PASSWORD: sentry
SENTRY_REDIS_HOST: redis
创建数据库
假设worker的docker实例id为23b9342a747b
docker exec -it 23b9342a747b sentry upgrade
想获取最新内容,请关注微信公众号
**粗体** _斜体_ [链接](http://example.com) `代码` - 列表 > 引用
。你还可以使用@
来通知其他用户。