Sentry installed via docker - how to set up https? Sentry installed via docker - how to set up https? docker docker

Sentry installed via docker - how to set up https?


You may use a proxy server such as nginx and forward 443 (https) to 8080 -if sentry does not supports directly- You may even use your own ssl certs with nginx easily and provide higher security.

If it supports directly check their docs.


I got this working by setting up UWSGI's HTTPS support: https://uwsgi-docs.readthedocs.io/en/latest/HTTPS.html

I configured Sentry to use it with the following in the sentry.conf.py file.

SENTRY_WEB_HOST = '0.0.0.0'SENTRY_WEB_PORT = '9000,sentry.crt,sentry.key'SENTRY_WEB_OPTIONS = {    'protocol': 'https'}


I configure sentry docker-compose file by adding nginx-ssl service in the docker-compose using valian/docker-nginx-auto-ssl docker image.I also modify the nginx service:

...  nginx:    <<: *restart_policy#    ports:#      - "$SENTRY_BIND:80/tcp"    image: "nginx:1.21.0-alpine"    volumes:      - type: bind        read_only: true        source: ./nginx        target: /etc/nginx    depends_on:      - web      - relay  nginx-ssl:    <<: *restart_policy    image: valian/docker-nginx-auto-ssl#    restart: on-failure    ports:      - 80:80      - 443:443    depends_on:      - nginx    volumes:      - ssl_data:/etc/resty-auto-ssl    environment:      ALLOWED_DOMAINS: 'sentry.example.com'      SITES: 'sentry.example.com=nginx:80'...volumes:  ...  ssl_data:...