diff --git a/agent/e2e/docker-compose.yml b/agent/e2e/docker-compose.yml new file mode 100644 index 0000000..0dd4cbb --- /dev/null +++ b/agent/e2e/docker-compose.yml @@ -0,0 +1,64 @@ +services: + e2e-agent-builder: + build: + context: .. + dockerfile: e2e/Dockerfile.agent-builder + volumes: + - ./artifacts:/artifacts + container_name: e2e-agent-builder + + e2e-postgres: + image: postgres:17 + environment: + POSTGRES_DB: testdb + POSTGRES_USER: testuser + POSTGRES_PASSWORD: testpassword + container_name: e2e-agent-postgres + command: postgres -c wal_level=replica -c max_wal_senders=3 + healthcheck: + test: ["CMD-SHELL", "pg_isready -U testuser -d testdb"] + interval: 2s + timeout: 5s + retries: 30 + + e2e-mock-server: + build: + context: . + dockerfile: Dockerfile.mock-server + volumes: + - ./artifacts:/artifacts:ro + container_name: e2e-mock-server + healthcheck: + test: ["CMD", "wget", "-q", "--spider", "http://localhost:4050/health"] + interval: 2s + timeout: 5s + retries: 10 + + e2e-agent-runner: + build: + context: . + dockerfile: Dockerfile.agent-runner + volumes: + - ./artifacts:/opt/agent/artifacts:ro + - ./scripts:/opt/agent/scripts:ro + depends_on: + e2e-postgres: + condition: service_healthy + e2e-mock-server: + condition: service_healthy + container_name: e2e-agent-runner + command: ["bash", "/opt/agent/scripts/run-all.sh", "host"] + + e2e-agent-docker: + build: + context: . + dockerfile: Dockerfile.agent-docker + volumes: + - ./artifacts:/opt/agent/artifacts:ro + - ./scripts:/opt/agent/scripts:ro + - /var/run/docker.sock:/var/run/docker.sock + depends_on: + e2e-postgres: + condition: service_healthy + container_name: e2e-agent-docker + command: ["bash", "/opt/agent/scripts/run-all.sh", "docker"]