Skip to content

Commit

Permalink
added proxy test script
Browse files Browse the repository at this point in the history
  • Loading branch information
EmmaLRussell committed Aug 22, 2024
1 parent 15fee02 commit b81969a
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 5 deletions.
2 changes: 2 additions & 0 deletions .github/workflows/build_proxy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,5 +26,7 @@ jobs:
run: ./proxy/docker/build
- name: Push SHA
run: ./proxy/docker/push
- name: Test container
run: ./proxy/docker/test
- name: Push branch tag
run: ./proxy/docker/push-branch-tag
17 changes: 12 additions & 5 deletions proxy/docker/test
100644 → 100755
Original file line number Diff line number Diff line change
Expand Up @@ -12,14 +12,21 @@ docker network create daedalus
# TODO: update branch when merged
WEB_APP_TAG=$REGISTRY/$ORG/daedalus-web-app:jidea-59-dockerise-web-app

docker run -d --run \
docker run -d \
--name daedalus-web-app \
--network=daedalus \
-e DATABASE_URL=postgresql://daedalus-web-app-user:changeme@not-a-db:5432/daedalus-web-app \
$WEB_APP_TAG


docker run -d --rm \
docker run -d \
--name daedalus-proxy \
--network=daedalus \
$TAG-SHA \
localhost daedalus-proxy http://daedalus-web-app:3000
-p 443:443 \
$TAG_SHA \
localhost daedalus-proxy http://daedalus-web-app:3000

docker exec daedalus-proxy /usr/local/bin/build-self-signed-certificate /run/proxy GB London IC jameel-institute localhost

sleep 1
docker logs daedalus-proxy | 2>&1 grep "Certificate files detected. Running nginxx." || (echo "Expected output not found"; exit 1)
echo "Expected output was found"

0 comments on commit b81969a

Please sign in to comment.