目前我在使用本地Sentry服务器时遇到了问题。我正在使用Lumen 5.4和sentry-laravel包将日志写入Sentry服务器。但是我失败了
这是我的docker-compose.yml:
version: '2'
services:
##
# Autodiscovery : Consul
##
autodiscovery:
build: ./autodiscovery/
mem_limit: 128m
expose:
- 53
- 8300
- 8301
- 8302
- 8400
- 8500
ports:
- 8500:8500
dns:
- 127.0.0.1
##
# Book Microservice
##
microservice_book_fpm:
build: ./microservices/book/php-fpm/
volumes_from:
- source_book
links:
- autodiscovery
- microservice_book_database
expose:
- 8080
environment:
- BACKEND=microservice-book-nginx
- CONSUL=autodiscovery
microservice_book_nginx:
build: ./microservices/book/nginx/
volumes_from:
- source_book
links:
- autodiscovery
- microservice_book_fpm
environment:
- BACKEND=microservice-book-fpm
- CONSUL=autodiscovery
ports:
- 8443:443
- 8081:80
- 9091:9090
microservice_book_database:
build: ./microservices/book/database/
environment:
- CONSUL=autodiscovery
- MYSQL_ROOT_PASSWORD=bookr_pwd
- MYSQL_DATABASE=bookr
- MYSQL_USER=bookr_usr
- MYSQL_PASSWORD=bookr_pwd
ports:
- 6666:3306
##
# Sentry
##
sentry_redis:
image: redis
expose:
- 6379
sentry_postgres:
image: postgres
environment:
- POSTGRES_PASSWORD=sentry
- POSTGRES_USER=sentry
volumes:
- /var/lib/postgresql/data
expose:
- 5432
sentry:
image: sentry
links:
- sentry_redis
- sentry_postgres
ports:
- 9876:9000
environment:
SENTRY_SECRET_KEY: 'b837e5a087c0a8727b1279bcdbe5a8a1'
SENTRY_POSTGRES_HOST: sentry_postgres
SENTRY_REDIS_HOST: sentry_redis
SENTRY_DB_USER: sentry
SENTRY_DB_PASSWORD: sentry
sentry_celery_beat:
image: sentry
links:
- sentry_redis
- sentry_postgres
command: sentry run cron
environment:
SENTRY_SECRET_KEY: 'b837e5a087c0a8727b1279bcdbe5a8a1'
SENTRY_POSTGRES_HOST: sentry_postgres
SENTRY_REDIS_HOST: sentry_redis
SENTRY_DB_USER: sentry
SENTRY_DB_PASSWORD: sentry
sentry_celery_worker:
image: sentry
links:
- sentry_redis
- sentry_postgres
command: sentry run worker
environment:
SENTRY_SECRET_KEY: 'b837e5a087c0a8727b1279bcdbe5a8a1'
SENTRY_POSTGRES_HOST: sentry_postgres
SENTRY_REDIS_HOST: sentry_redis
SENTRY_DB_USER: sentry
SENTRY_DB_PASSWORD: sentry
##
# Telemetry: prometheus
##
telemetry:
build: ./telemetry/
links:
- autodiscovery
expose:
- 9090
ports:
- 9090:9090
##
# Source containers
##
source_book:
image: nginx:stable
volumes:
- ../source/book:/var/www/html
command: "true"
请帮我弄清楚为什么我无法从Docker容器连接到本地Sentry服务器。非常感谢和抱歉我的英语不好:(