diff --git a/tests/docker-compose.yml b/tests/docker-compose.yml new file mode 100644 index 0000000..47c8c9d --- /dev/null +++ b/tests/docker-compose.yml @@ -0,0 +1,49 @@ +version: '3.2' +services: + api-db: + image: uselagoon/api-db + ports: + - '3366:3306' + webhook-handler: + image: uselagoon/webhook-handler + command: yarn run dev + ports: + - '7777:3000' + broker: + image: uselagoon/broker-single + ports: + - '15672:15672' + - '5672:5672' + webhooks2tasks: + image: uselagoon/webhooks2tasks + command: yarn run dev + api: + image: uselagoon/api + command: yarn run dev + depends_on: + - api-db + - keycloak + ports: + - '3000:3000' + ui: + image: uselagoon/ui + command: yarn run dev + ports: + - '8888:3000' + keycloak: + image: uselagoon/keycloak + user: '111111111' + depends_on: + - keycloak-db + ports: + - '8088:8080' + keycloak-db: + image: uselagoon/keycloak-db + ports: + - '3336:3306' + local-api-data-watcher-pusher: + depends_on: + - api + image: uselagoon/local-api-data-watcher-pusher + api-redis: + image: uselagoon/api-redis diff --git a/tests/scripts/api-destroy b/tests/scripts/api-destroy index b9e5447..aa31b1f 100755 --- a/tests/scripts/api-destroy +++ b/tests/scripts/api-destroy @@ -1,5 +1,5 @@ #!/usr/bin/env bash set -e -cd vendor/uselagoon/lagoon +cd tests docker-compose kill docker-compose rm -fv diff --git a/tests/scripts/api-logs b/tests/scripts/api-logs index f9b88dd..cfdb4ed 100755 --- a/tests/scripts/api-logs +++ b/tests/scripts/api-logs @@ -1,4 +1,4 @@ #!/usr/bin/env bash set -e -cd vendor/uselagoon/lagoon +cd tests docker-compose logs -f $1 diff --git a/tests/scripts/api-restart b/tests/scripts/api-restart index 52c41a8..be10d0e 100644 --- a/tests/scripts/api-restart +++ b/tests/scripts/api-restart @@ -1,5 +1,5 @@ #!/usr/bin/env bash -cd vendor/uselagoon/lagoon +cd tests #docker-compose restart --no-deps api # Lando's docker compose version does not have "--no-deps". docker-compose restart api diff --git a/tests/scripts/api-start b/tests/scripts/api-start index b3b4d6e..312d6c9 100755 --- a/tests/scripts/api-start +++ b/tests/scripts/api-start @@ -3,9 +3,8 @@ set -ex CI_BUILD_TAG=php_sdk -cd vendor/uselagoon/lagoon -make clean -make api-development +cd tests +docker-compose up -d # Connects the Lando container group to the API container. docker network connect demolagoonsh_default lagoon_api_1 \ diff --git a/tests/scripts/api-stop b/tests/scripts/api-stop index 4a4b8f1..2b3c311 100755 --- a/tests/scripts/api-stop +++ b/tests/scripts/api-stop @@ -1,4 +1,4 @@ #!/usr/bin/env bash set -e -cd vendor/uselagoon/lagoon +cd tests docker-compose stop diff --git a/tests/scripts/ui-start b/tests/scripts/ui-start index 09d1c7e..d7467db 100644 --- a/tests/scripts/ui-start +++ b/tests/scripts/ui-start @@ -1,3 +1,3 @@ #!/usr/bin/env bash -cd vendor/uselagoon/lagoon +cd tests make ui-development diff --git a/tests/scripts/ui-stop b/tests/scripts/ui-stop index 547baf2..4c9fa35 100644 --- a/tests/scripts/ui-stop +++ b/tests/scripts/ui-stop @@ -1,3 +1,3 @@ #!/usr/bin/env bash -cd vendor/uselagoon/lagoon +cd tests docker-compose stop