Migration from Sentry 9.1.2 to Sentry 20

I’m running the sentry 9.1.2 on swarm with a simple docker-compose file.

I’m starting with this:

docker-compose.yml
version: '3.8'

services:
  redis:
    image: redis
    labels:
      - "traefik.enable=false"
    networks:
      - back-end
    volumes:
      - redis-data:/data:rw

  postgres:
    image: postgres:13
    labels:
      - "traefik.enable=false"
    networks:
      - back-end
    environment:
      POSTGRES_USER: YYYYYYYYYYY
      POSTGRES_PASSWORD: XXXXXXXXXXX
      POSTGRES_DB: sentry
    volumes:
#      - /etc/localtime:/etc/localtime:ro
      - $PWD/postgresql-data:/var/lib/postgresql/data
      - $PWD/bkp:/bkp

  sentry:
    image: sentry
    depends_on:
     - redis
     - postgres
    ports:
     - 9001:9000
    networks:
      - public
      - back-end
    deploy:
      labels:
        - traefik.enable=true
        - traefik.docker.network=public
        # [other traefik labels]
        - traefik.http.services.sentry-service.loadbalancer.server.port=9000
    volumes:
      - /etc/localtime:/etc/localtime:ro
      - $PWD/files:/var/lib/sentry/files:rw
      - $PWD/config.yml:/etc/sentry/config.yml
    env_file:
      - $PWD/sentry.env

  cron:
    image: sentry
    labels:
      - "traefik.enable=false"
    depends_on:
     - redis
     - postgres
    networks:
      - back-end
    command: "sentry run cron"
    volumes:
      - /etc/localtime:/etc/localtime:ro
      - $PWD/files:/var/lib/sentry/files:rw
    env_file:
      - $PWD/sentry.env

  worker:
    image: sentry
    labels:
      - "traefik.enable=false"
    depends_on:
     - redis
     - postgres
    networks:
      - back-end
    command: "sentry run worker"
    env_file:
      - $PWD/sentry.env
    volumes:
      - /etc/localtime:/etc/localtime:ro
      - $PWD/files:/var/lib/sentry/files:rw

volumes:
  redis-data:

networks:
  back-end:
  public:
    external:
      name: public

I’m really struggling with the migration.
I’m ok to switch from swarm to docker, but… I only got errors on errors on errors.
Any idea what could be the firsts steps?
Thanks a lot already

This is because Sentry v10+ is quite different from earlier versions and needs many more services to run alongside. So my recommendation is to start off from our official onpremise repo and adap that to use Swarm or whatever you want to use instead of trying to adapt your existing file to the new one.

Make sure to do the same thing for configuration files too.

1 Like

I wrote an article recently that may be helpful:

2 Likes

This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.