如何在哨兵码头工人中更改 config.yml?



我在机器中设置了带有码头工人的哨兵。我想集成 GitHub 插件。为此,我需要在配置文件中添加一些设置。

docker 撰写文件是,

version: '2'
services:
redis:
image: redis
postgres:
image: 'postgres'
environment:
POSTGRES_USER: postgres
POSTGRES_PASSWORD: postgres
POSTGRES_DBNAME: sentry
POSTGRES_DBUSER: sentry
POSTGRES_DBPASS: sentry
volumes:
- ~/sentry/data:/var/lib/postgresql/data
sentry:
image: sentry
depends_on:
- redis
- postgres
links:
- redis
- postgres
ports:
- 9000:9000
environment:
SENTRY_SECRET_KEY: '<SECRET-KEY>'
SENTRY_POSTGRES_HOST: postgres
SENTRY_DB_USER: postgres
SENTRY_DB_PASSWORD: postgres
SENTRY_REDIS_HOST: redis
SENTRY_SERVER_EMAIL: '<FROM-EMAIL>'
SENTRY_EMAIL_HOST: <EMAIL-HOST>
SENTRY_EMAIL_PORT: <EMAIL-PORT>
SENTRY_EMAIL_USER: '<USER-NAME>'
SENTRY_EMAIL_PASSWORD: '<USER-PASSWD>'
SENTRY_EMAIL_USE_TLS: 'true'
sentry-cron:
image: sentry
depends_on:
- redis
- postgres
command: "sentry run cron"
environment:
SENTRY_SECRET_KEY: '<SECRET-KEY>'
SENTRY_POSTGRES_HOST: postgres
SENTRY_DB_USER: postgres
SENTRY_DB_PASSWORD: postgres
SENTRY_REDIS_HOST: redis
SENTRY_SERVER_EMAIL: '<FROM-EMAIL>'      
SENTRY_EMAIL_HOST: <EMAIL-HOST>
SENTRY_EMAIL_PORT: <EMAIL-PORT>
SENTRY_EMAIL_USER: '<USER-NAME>'
SENTRY_EMAIL_PASSWORD: '<USER-PASSWD>'
SENTRY_EMAIL_USE_TLS: 'true'
sentry-worker-1:
image: sentry
depends_on:
- redis
- postgres
command: "sentry run worker"
environment:
SENTRY_SECRET_KEY: '<SECRET-KEY>'
SENTRY_POSTGRES_HOST: postgres
SENTRY_DB_USER: postgres
SENTRY_DB_PASSWORD: postgres
SENTRY_REDIS_HOST: redis
SENTRY_SERVER_EMAIL: '<FROM-EMAIL>'      
SENTRY_EMAIL_HOST: <EMAIL-HOST>
SENTRY_EMAIL_PORT: <EMAIL-PORT>
SENTRY_EMAIL_USER: '<USER-NAME>'
SENTRY_EMAIL_PASSWORD: '<USER-PASSWD>'
SENTRY_EMAIL_USE_TLS: 'true'

运行的容器是,

root@sentry:~# docker ps
CONTAINER ID        IMAGE               COMMAND                  CREATED              STATUS              PORTS                    NAMES                                                                                         
af70794fbd0d        sentry              "/entrypoint.sh run …"   About a minute ago   Up About a minute   0.0.0.0:9000->9000/tcp   root_sentry_1                                                                                 
733862200ac9        sentry              "/entrypoint.sh sent…"   About a minute ago   Up About a minute   9000/tcp                 root_sentry-cron_1                                                                            
4d6bc8691010        sentry              "/entrypoint.sh sent…"   About a minute ago   Up About a minute   9000/tcp                 root_sentry-worker-1_1
1cd4f132ccca        redis               "docker-entrypoint.s…"   About a minute ago   Up About a minute   6379/tcp                 root_redis_1
0c887f4b5ee0        postgres            "docker-entrypoint.s…"   About a minute ago   Up About a minute   5432/tcp                 root_postgres_1

我在/etc/sentrysentry_1容器中找到了一个配置文件。是配置文件还是我错过了什么? 感谢您的任何帮助。

如果您看到文档,他们建议使用 .

sentry:onbuild

通过此映像,可以轻松地自定义构建自己的 Sentry 实例: 在自定义config.yml和/或sentry.conf.py文件中复制,以及 从requirements.txt安装插件。

也可以在onbuild中开发自定义扩展 包。如果构建目录包含setup.py文件,这将 也安装。

有关详细信息,请参阅官方哨兵文档。

要创建自定义sentry:onbuild包,只需执行以下操作:

创建包含FROM sentry:onbuildin 相同的 Dockerfile 目录中,添加您的自定义configuration files。您可以获取副本 这些文件用作 docker-sentry GitHub 存储库中的模板。 构建映像:docker build -t mysentry .使用 mysentry 而不是 sentry 运行自定义映像。

相关内容

  • 没有找到相关文章

最新更新