diff --git a/opt/00-infrastructure/postgres/docker-compose.yml b/opt/00-infrastructure/postgres/docker-compose.yml index 2d06ea3..67135b1 100644 --- a/opt/00-infrastructure/postgres/docker-compose.yml +++ b/opt/00-infrastructure/postgres/docker-compose.yml @@ -34,6 +34,19 @@ services: interval: 10s timeout: 5s retries: 5 + postgres-exporter: + image: prometheuscommunity/postgres-exporter:latest + container_name: postgres-exporter + restart: unless-stopped + networks: + - database-internal + env_file: + - .env + environment: + DATA_SOURCE_NAME: "postgresql://${POSTGRES_ADMIN_USER}:${POSTGRES_ADMIN_PASSWORD}@postgres-main:5432/postgres?sslmode=disable" + depends_on: + postgres: + condition: service_healthy pgadmin: image: dpage/pgadmin4:9.9 container_name: pgadmin @@ -49,9 +62,6 @@ services: PGADMIN_CONFIG_SERVER_MODE: 'True' PGADMIN_CONFIG_MASTER_PASSWORD_REQUIRED: 'False' PGADMIN_SERVER_JSON_FILE: /pgadmin4/servers.json - PGADMIN_CONFIG_AUTHENTICATION_SOURCES: '[''webserver'']' - PGADMIN_CONFIG_WEBSERVER_REMOTE_USER: '''X-authentik-username''' - PGADMIN_CONFIG_WEBSERVER_AUTO_CREATE_USER: 'True' volumes: - pgadmin-data:/var/lib/pgadmin - ./pgadmin-config/servers.json:/pgadmin4/servers.json:ro @@ -61,7 +71,8 @@ services: - traefik.http.routers.pgadmin.entrypoints=websecure - traefik.http.routers.pgadmin.tls.certresolver=cloudflare - traefik.http.services.pgadmin.loadbalancer.server.port=80 - - traefik.http.routers.pgadmin.middlewares=authentik@file + # Authentik middleware temporarily disabled for direct access + # - traefik.http.routers.pgadmin.middlewares=authentik@file depends_on: postgres: condition: service_healthy diff --git a/opt/04-tools/monitoring/docker-compose.yml b/opt/04-tools/monitoring/docker-compose.yml index af8a8b1..fc742d8 100644 --- a/opt/04-tools/monitoring/docker-compose.yml +++ b/opt/04-tools/monitoring/docker-compose.yml @@ -16,6 +16,7 @@ services: networks: - monitoring - traefik-public + - database-internal labels: - "traefik.enable=true" - "traefik.http.routers.prometheus.rule=Host(`prometheus.ai-impress.com`)" @@ -99,6 +100,8 @@ networks: driver: bridge traefik-public: external: true + database-internal: + external: true volumes: prometheus_data: