File tree Expand file tree Collapse file tree 3 files changed +6
-4
lines changed
infrastructure/environments/test/fake-api Expand file tree Collapse file tree 3 files changed +6
-4
lines changed Original file line number Diff line number Diff line change @@ -10,10 +10,11 @@ COPY --chmod=0755 <<EOF /entrypoint.sh
1010set -e
1111
1212export LOGIN_ROOT_URL=\$ {LOGIN_ROOT_URL:-'http://api.test.vita.internal' }
13+ export APP_ROOT_URL=\$ {APP_ROOT_URL:-'http://app.test.vita.internal' }
1314export ELID_DELAY_SECONDS=\$ {ELID_DELAY_SECONDS:-0}
1415export APIM_DELAY_SECONDS=\$ {APIM_DELAY_SECONDS:-0}
1516
16- envsubst '\$ LOGIN_ROOT_URL \$ ELID_DELAY_SECONDS \$ APIM_DELAY_SECONDS' < /etc/nginx/conf.d/default.conf.template > /etc/nginx/conf.d/default.conf
17+ envsubst '\$ LOGIN_ROOT_URL \$ APP_ROOT_URL \$ ELID_DELAY_SECONDS \$ APIM_DELAY_SECONDS' < /etc/nginx/conf.d/default.conf.template > /etc/nginx/conf.d/default.conf
1718
1819exec "\$ @"
1920EOF
Original file line number Diff line number Diff line change 77 sub_filter_types application/json;
88
99 set $login_root_url "${LOGIN_ROOT_URL}" ;
10+ set $app_root_url "${APP_ROOT_URL}" ;
1011
1112 location /eligibility-signposting-api/patient-check/ {
1213 access_by_lua_block { ngx.sleep( ${ ELID_DELAY_SECONDS} ) }
@@ -38,7 +39,7 @@ server {
3839 }
3940
4041 location = /authorize {
41- return 302 'https://localhost:3000 /api/auth/callback/nhs-login?code=2345&$args' ;
42+ return 302 '$app_root_url /api/auth/callback/nhs-login?code=2345&$args' ;
4243 }
4344
4445 location = /token {
Original file line number Diff line number Diff line change @@ -19,7 +19,7 @@ docker build --no-cache -t fake-api .
1919
2020docker stop local-fake-api
2121
22- docker run -d --rm -p 9123:9123 -e LOGIN_ROOT_URL=" http://localhost:9123" -e ELID_DELAY_SECONDS=1 -e APIM_DELAY_SECONDS=1 --name local-fake-api fake-api
22+ docker run -d --rm -p 9123:9123 -e LOGIN_ROOT_URL=" http://localhost:9123" -e APP_ROOT_URL= " https://localhost:3000 " -e ELID_DELAY_SECONDS=1 -e APIM_DELAY_SECONDS=1 --name local-fake-api fake-api
2323
2424docker logs local-fake-api --follow | less +F # If you need to see what's going on in nginx
2525
@@ -72,7 +72,7 @@ docker tag fake-api:latest "$fake_api_ecr_repository_url":latest
7272
7373docker push " $fake_api_ecr_repository_url " :latest
7474
75- aws ecs update-service --cluster fake-api-ecs -cluster --service fake-api-ecs-service --force-new-deployment --profile vita-dev --region eu-west-2
75+ aws ecs update-service --cluster fake-api-project -cluster --service fake-api --force-new-deployment --profile vita-test --region eu-west-2
7676```
7777
7878### Check it's working
You can’t perform that action at this time.
0 commit comments