@@ -30,41 +30,48 @@ sso_registration_scopes = sso:account:access
3030
3131## Tasks
3232
33- ### Build infra
34-
35- ``` sh
36- aws sso login --profile vita-dev
37- aws sts get-caller-identity --profile vita-dev
38- terraform init
39- AWS_PROFILE=" vita-dev" terraform plan
40- # AWS_PROFILE="vita-dev" terraform apply
41- ```
42-
4333### Build & test image
4434
4535``` sh
46- docker build -t fake-api . # Local testing
47- docker build --platform linux/amd64 -t fake-api . # For AWS
36+ docker build -t fake-api . # For local testing
4837
4938docker stop local-fake-api ; docker rm local-fake-api ; docker run -d --rm -p 9123:9123 -e ELID_DELAY_SECONDS=2 -e APIM_DELAY_SECONDS=10 --name local-fake-api fake-api
5039
5140curl -v http://localhost:9123/health
5241curl -v http://localhost:9123/eligibility-signposting-api/patient-check/9658218989
5342curl -v -X POST http://localhost:9123/oauth2/token
43+
44+ docker build --platform linux/amd64 -t fake-api . # For AWS
45+ ```
46+
47+ ### Build infra
48+
49+ ``` sh
50+ aws sso login --profile vita-dev
51+
52+ aws sts get-caller-identity --profile vita-dev
53+
54+ terraform init
55+
56+ AWS_PROFILE=" vita-dev" terraform plan
57+
58+ AWS_PROFILE=" vita-dev" terraform apply
5459```
5560
5661### Upload image
5762
5863``` sh
59- aws ecr get-login-password --region eu-west-2 | docker login --username AWS --password-stdin $( terraform output -raw ecr_repository_url | cut -d/ -f1)
64+ aws ecr get-login-password --region eu-west-2 --profile vita-dev | docker login --username AWS --password-stdin $( terraform output -raw ecr_repository_url | cut -d/ -f1)
6065
6166docker tag fake-api:latest $( terraform output -raw ecr_repository_url) :latest
6267
6368docker push $( terraform output -raw ecr_repository_url) :latest
6469
6570aws ecs update-service --cluster fake-api-ecs-cluster --service fake-api-ecs-service --force-new-deployment --profile vita-dev --region eu-west-2
6671
67- curl $( terraform output -raw application_url) /api/9658220150
72+ curl -v $( terraform output -raw application_url) /health
73+ curl -v $( terraform output -raw application_url) /eligibility-signposting-api/patient-check/9658218989
74+ curl -v -X POST $( terraform output -raw application_url) /oauth2/token
6875```
6976
7077## Load testing
0 commit comments