Ctrl K
ComunidadGuías…

compose.dev-dependencies.yml

Rama main · réplica de lectura del repositorio original.

Archivo original ↗Preguntar a KiBot
# Standalone test dependencies — joins the dev network (jarvis_default) as external.
# Requires: make up (dev stack) must be running first so the network exists.
#
# Usage (via Makefile):
#   make up-alertmanager / make down-alertmanager
#   make up-alertmanager-ha / make down-alertmanager-ha   (2-member HA gossip pair)
#   make up-postgres / make down-postgres
#
# Reachable from backend container:
#   Alertmanager:    http://test-alertmanager:9093
#   Alertmanager HA: http://test-alertmanager:9093,http://test-alertmanager-2:9093
#   PostgreSQL:      postgres://jarvis:jarvis@test-postgres:5432/jarvis?sslmode=disable
#
# Reachable from host:
#   Alertmanager:      http://localhost:9094
#   Alertmanager HA-2: http://localhost:9095
#   PostgreSQL:        postgres://jarvis:jarvis@localhost:5432/jarvis?sslmode=disable
#
# NOTE: sslmode=disable is intentional here — this is a local ephemeral test
# container with no TLS configured. Never use sslmode=disable in production.

services:
  test-alertmanager:
    image: docker.io/prom/alertmanager:latest
    container_name: jarvis_test_alertmanager
    command:
      - '--config.file=/etc/alertmanager/alertmanager.yml'
      - '--storage.path=/alertmanager'
      - '--web.listen-address=0.0.0.0:9093'
      - '--cluster.listen-address=0.0.0.0:9094'
      - '--cluster.peer=test-alertmanager-2:9094'
    ports:
      - "9094:9093"
    volumes:
      - ./scripts/test-alertmanager.yml:/etc/alertmanager/alertmanager.yml:ro,z
    restart: unless-stopped

  # Second HA gossip member — same config, peers with test-alertmanager over
  # Alertmanager's mesh protocol so silences created against either instance
  # replicate to both. Started only via `make up-alertmanager-ha`.
  test-alertmanager-2:
    image: docker.io/prom/alertmanager:latest
    container_name: jarvis_test_alertmanager_2
    command:
      - '--config.file=/etc/alertmanager/alertmanager.yml'
      - '--storage.path=/alertmanager'
      - '--web.listen-address=0.0.0.0:9093'
      - '--cluster.listen-address=0.0.0.0:9094'
      - '--cluster.peer=test-alertmanager:9094'
    ports:
      - "9095:9093"
    volumes:
      - ./scripts/test-alertmanager.yml:/etc/alertmanager/alertmanager.yml:ro,z
    restart: unless-stopped
    profiles: ["ha"]

  test-postgres:
    image: docker.io/postgres:16-alpine
    container_name: jarvis_test_postgres
    environment:
      POSTGRES_DB: jarvis
      POSTGRES_USER: jarvis
      POSTGRES_PASSWORD: jarvis
    ports:
      - "5432:5432"
    tmpfs:
      - /var/lib/postgresql/data
    restart: unless-stopped

networks:
  default:
    name: jarvis_default
    external: true