Skip to content

Commit

Permalink
Add a volumeless docker-compose.yaml file for testing and development. (
Browse files Browse the repository at this point in the history
#2)

* Adding a volumeless docker-compose file for (potentially) faster testing.
* Use docker-compose instead of make api-development.
* Use docker-compose in tests folder instead of make api-development.
  • Loading branch information
jonpugh authored Feb 22, 2021
1 parent 09ff0ca commit 2a15844
Show file tree
Hide file tree
Showing 8 changed files with 57 additions and 9 deletions.
49 changes: 49 additions & 0 deletions tests/docker-compose.yml
Original file line number Diff line number Diff line change
@@ -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
2 changes: 1 addition & 1 deletion tests/scripts/api-destroy
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
#!/usr/bin/env bash
set -e
cd vendor/uselagoon/lagoon
cd tests
docker-compose kill
docker-compose rm -fv
2 changes: 1 addition & 1 deletion tests/scripts/api-logs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/usr/bin/env bash
set -e
cd vendor/uselagoon/lagoon
cd tests
docker-compose logs -f $1
2 changes: 1 addition & 1 deletion tests/scripts/api-restart
Original file line number Diff line number Diff line change
@@ -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
5 changes: 2 additions & 3 deletions tests/scripts/api-start
Original file line number Diff line number Diff line change
Expand Up @@ -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 \
Expand Down
2 changes: 1 addition & 1 deletion tests/scripts/api-stop
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/usr/bin/env bash
set -e
cd vendor/uselagoon/lagoon
cd tests
docker-compose stop
2 changes: 1 addition & 1 deletion tests/scripts/ui-start
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
#!/usr/bin/env bash
cd vendor/uselagoon/lagoon
cd tests
make ui-development
2 changes: 1 addition & 1 deletion tests/scripts/ui-stop
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
#!/usr/bin/env bash
cd vendor/uselagoon/lagoon
cd tests
docker-compose stop

0 comments on commit 2a15844

Please sign in to comment.