Ctrl K
ComunidadGuías…

docker-compose.test.yml

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

Archivo original ↗Preguntar a KiBot
# Pin the Compose project name. scripts/test-api-integration.sh already passes
# `-p kanera-api-test`, but without this line a bare `docker compose -f docker-compose.test.yml ...`
# falls back to the directory name and resolves to the same `kanera` project as
# docker-compose.dev.yml — where a `down -v` will delete the development database volume.
name: kanera-api-test

services:
  postgres:
    image: postgres:18.6-alpine
    container_name: kanera-api-test-postgres
    environment:
      POSTGRES_USER: kanera_test
      POSTGRES_PASSWORD: kanera_test
      POSTGRES_DB: kanera_test
      PGDATA: /var/lib/postgresql/18/docker
    ports:
      - "127.0.0.1:55433:5432"
    volumes:
      - ./docker/postgres/init.sql:/docker-entrypoint-initdb.d/00-init.sql:ro,Z
    healthcheck:
      test: ["CMD-SHELL", "pg_isready -h 127.0.0.1 -p 5432 -U kanera_test -d kanera_test"]
      interval: 2s
      timeout: 3s
      retries: 20

  valkey:
    image: valkey/valkey:9.1.3-alpine
    container_name: kanera-api-test-valkey
    ports:
      - "127.0.0.1:56379:6379"
    healthcheck:
      test: ["CMD", "valkey-cli", "ping"]
      interval: 2s
      timeout: 3s
      retries: 20