From 9b44d3ec63fe372708a9d9394b1b8d0b5a5a80ea Mon Sep 17 00:00:00 2001 From: Martin McKeaveney Date: Sun, 25 Sep 2022 23:43:37 +0100 Subject: [PATCH] adding startup script for local --- .github/workflows/budibase_ci.yml | 2 +- qa-core/.env | 4 +++- qa-core/docker-compose.yaml | 12 ++++++++++++ qa-core/package.json | 4 +++- 4 files changed, 19 insertions(+), 3 deletions(-) create mode 100644 qa-core/docker-compose.yaml diff --git a/.github/workflows/budibase_ci.yml b/.github/workflows/budibase_ci.yml index 06a21c5348..475bd4f66a 100644 --- a/.github/workflows/budibase_ci.yml +++ b/.github/workflows/budibase_ci.yml @@ -27,7 +27,7 @@ jobs: couchdb: image: ibmcom/couchdb3 env: - COUCHDB_PASSWORD: budibase + COUCHDB_PASSWORD: budibase COUCHDB_USER: budibase ports: - 4567:5984 diff --git a/qa-core/.env b/qa-core/.env index 7f39785f33..36dd0a3656 100644 --- a/qa-core/.env +++ b/qa-core/.env @@ -1,4 +1,6 @@ BB_ADMIN_USER_EMAIL=qa@budibase.com BB_ADMIN_USER_PASSWORD=budibase ENCRYPTED_TEST_PUBLIC_API_KEY=a65722f06bee5caeadc5d7ca2f543a43-d610e627344210c643bb726f -COUCH_DB_URL=http://budibase:budibase@localhost:4567 \ No newline at end of file +COUCH_DB_URL=http://budibase:budibase@localhost:4567 +COUCH_DB_USER=budibase +COUCH_DB_PASSWORD=budibase \ No newline at end of file diff --git a/qa-core/docker-compose.yaml b/qa-core/docker-compose.yaml new file mode 100644 index 0000000000..abd8e4818e --- /dev/null +++ b/qa-core/docker-compose.yaml @@ -0,0 +1,12 @@ +version: "3.8" +services: + qa-core-couchdb: + # platform: linux/amd64 + container_name: budi-couchdb-qa + restart: on-failure + image: ibmcom/couchdb3 + environment: + - COUCHDB_PASSWORD=${COUCH_DB_PASSWORD} + - COUCHDB_USER=${COUCH_DB_USER} + ports: + - "4567:5984" diff --git a/qa-core/package.json b/qa-core/package.json index b2c3f464d7..529827bc9f 100644 --- a/qa-core/package.json +++ b/qa-core/package.json @@ -12,7 +12,9 @@ "test": "jest --runInBand", "test:watch": "jest --watch", "test:debug": "DEBUG=1 jest", - "api:server:setup": "env-cmd ts-node ../packages/builder/cypress/ts/setup.ts", + "docker:up": "docker-compose up -d", + "docker:down": "docker-compose down", + "api:server:setup": "npm run docker:up && env-cmd ts-node ../packages/builder/cypress/ts/setup.ts", "api:server:setup:ci": "env-cmd node ../packages/builder/cypress/setup.js", "api:test:ci": "start-server-and-test api:server:setup:ci http://localhost:4100/builder test", "api:test": "start-server-and-test api:server:setup http://localhost:4100/builder test"