I have found the official sentry image in dockerhub. But the document is incomplete and I can't setup the environment step by step.
We have to setup the database container first but none of them tell how to setup it at first. Specifically I don't know what are the username and password that sentry will use.
And I also get the following error when I run the sentry container:
sudo docker run --name some-sentry --link some-mysql:mysql -d sentry
e888fcf2976a9ce90f80b28bb4c822c07f7e0235e3980e2a33ea7ddeb0ff18ce
sudo docker logs some-sentry
Traceback (most recent call last):
File "/usr/local/bin/sentry", line 9, in <module>
load_entry_point('sentry==6.4.4', 'console_scripts', 'sentry')()
File "/usr/local/lib/python2.7/site-packages/sentry/utils/runner.py", line 310, in main
initializer=initialize_app,
File "/usr/local/lib/python2.7/site-packages/logan/runner.py", line 167, in run_app
configure_app(config_path=config_path, **kwargs)
File "/usr/local/lib/python2.7/site-packages/logan/runner.py", line 89, in configure_app
raise ValueError("Configuration file does not exist at %r" % (config_path,))
ValueError: Configuration file does not exist at '/.sentry/sentry.conf.py'
They don't seem to want to build the official image for us any more as per the deprecation notice on Docker Hub. However, good news, in https://develop.sentry.dev/self-hosted/#getting-started
Seems Kafka and Zookeeper are now required too. Follow the docs to stay up to date.
This is a moving target. I suggest checking https://hub.docker.com/_/sentry/ for updates as their documentation is pretty good.
Circa version 8 you can easily convert those instructions to use docker-compose
version: "2"
services:
redis:
image: redis:3.0.7
networks:
- sentry-net
postgres:
image: postgres:9.6.1
environment:
- POSTGRES_USER:sentry
- POSTGRES_PASSWORD:sentry
# volumes:
# - ./data:/var/lib/postgresql/data:rw
networks:
- sentry-net
sentry:
image: sentry:${SENTRY_TAG}
depends_on:
- redis
- postgres
environment:
- SENTRY_REDIS_HOST=redis
- SENTRY_SECRET_KEY=${SECRET}
- SENTRY_POSTGRES_HOST=postgres
ports:
- 9000:9000
networks:
- sentry-net
sentry_celery_beat:
image: sentry:${SENTRY_TAG}
depends_on:
- sentry
environment:
- SENTRY_REDIS_HOST=redis
- SENTRY_SECRET_KEY=${SECRET}
- SENTRY_POSTGRES_HOST=postgres
command: "sentry run cron"
networks:
- sentry-net
sentry_celery_worker:
image: sentry:${SENTRY_TAG}
depends_on:
- sentry
environment:
- SENTRY_REDIS_HOST=redis
- SENTRY_SECRET_KEY=${SECRET}
- SENTRY_POSTGRES_HOST=postgres
command: "sentry run worker"
networks:
- sentry-net
networks:
sentry-net:
SENTRY_TAG=8.10.0
Run docker run --rm sentry:8.10.0 config generate-secret-key
and add the secret
SENTRY_TAG=8.10.0
SECRET=somelongsecretgeneratedbythetool
First boot:
docker-compose up -d postgres
docker-compose up -d redis
docker-compose run sentry sentry upgrade
Full boot
docker-compose up -d
Debug
docker-compose ps
docker-compose logs --tail=10
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With