我正在尝试通过 docker compose 运行 Web、数据库和 Redis 服务,但我的 Web 容器不断出现故障。在检查日志时,我看到:-urllib3.exceptions.MaxRetryError: HTTPSConnectionPool(host='localhost', port=8443): Max retries exceeded with url: / (Caused by NewConnectionError('<urllib3.connection.HTTPSConnection object at 0x7fc998b43070>: Failed to establish a new connection: [Errno 111] Connection refused'))
重现问题:-
1. git clone https://github.com/PostHog/posthog && cd posthog and run docker-compose up -d
2. This is my docker compose file :-
services:
db:
container_name: posthog_db
environment:
POSTGRES_DB: posthog
POSTGRES_PASSWORD: posthog
POSTGRES_USER: posthog
image: postgres:alpine
volumes:
- postgres-data:/var/lib/postgresql/data
redis:
container_name: posthog_redis
image: redis:alpine
web:
container_name: posthog_web
depends_on: …Run Code Online (Sandbox Code Playgroud)