From 2a036eab005fa39f035550922cc4a3fd556a81fc Mon Sep 17 00:00:00 2001 From: Nitish Tiwari Date: Sat, 11 Feb 2023 19:34:17 +0530 Subject: [PATCH] Add docker compose for smoke testing --- docker-compose.yaml | 80 +++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 80 insertions(+) create mode 100644 docker-compose.yaml diff --git a/docker-compose.yaml b/docker-compose.yaml new file mode 100644 index 000000000..ada0e4803 --- /dev/null +++ b/docker-compose.yaml @@ -0,0 +1,80 @@ +version: "3.7" + +networks: + parseable: + +services: + + minio: + image: minio/minio:RELEASE.2023-02-10T18-48-39Z + entrypoint: + - sh + - -euc + - | + mkdir -p /data/parseable && \ + minio server /data + environment: + - MINIO_ROOT_USER=parseable + - MINIO_ROOT_PASSWORD=supersecret + - MINIO_UPDATE=off + ports: + - 9000 + volumes: + - /tmp/data/minio:/data + healthcheck: + test: [ "CMD", "curl", "-f", "http://localhost:9000/minio/health/live" ] + interval: 15s + timeout: 20s + retries: 5 + networks: + - parseable + + parseable: + image: parseable/parseable:v0.2.1 + command: ["parseable", "s3-store"] + ports: + - 8000 + environment: + - P_S3_URL=http://minio:9000 + - P_S3_ACCESS_KEY=parseable + - P_S3_SECRET_KEY=supersecret + - P_S3_REGION=us-east-1 + - P_S3_BUCKET=parseable + - P_STAGING_DIR=/tmp/data + - P_USERNAME=admin + - P_PASSWORD=admin + networks: + - parseable + healthcheck: + test: [ "CMD", "curl", "-f", "http://localhost:8000/api/v1/liveness" ] + interval: 15s + timeout: 20s + retries: 5 + depends_on: + - minio + + quest-smoke: + image: parseable/quest:v0.1 + command: ["smoke", "http://parseable:8000", "admin", "admin"] + networks: + - parseable + depends_on: + - parseable + deploy: + restart_policy: + condition: on-failure + delay: 10s + max_attempts: 10 + + quest-load: + image: parseable/quest:v0.1 + command: ["load", "http://parseable:8000", "admin", "admin"] + networks: + - parseable + depends_on: + - quest-smoke + deploy: + restart_policy: + condition: on-failure + delay: 10s + max_attempts: 10