docker-compose运行sentry

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

想获取最新内容,请关注微信公众号

qrcode_for_gh_121b87c80448_258.jpg

你可能感兴趣的:(docker-compose运行sentry)