-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathMakefile
More file actions
41 lines (31 loc) · 1.31 KB
/
Makefile
File metadata and controls
41 lines (31 loc) · 1.31 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
SHELL = /bin/sh
$(eval FRONTEND_NAME=dod_surveystream_frontend)
$(eval VERSION=0.1)
$(eval PROD_NEW_ACCOUNT=923242859002)
$(eval STAGING_ACCOUNT=210688620213)
$(eval ADMIN_ACCOUNT=077878936716)
$(eval DEV_ACCOUNT=453207568606)
login:
@export AWS_PROFILE=surveystream_dev
@aws sso login --profile surveystream_dev
image:
@docker build -f Dockerfile.client --build-arg BUILD_ENV="development" --rm --platform=linux/amd64 -t $(FRONTEND_NAME):$(VERSION) .
image-test:
@docker build -f Dockerfile.test --build-arg BUILD_ENV="development" --rm --platform=linux/arm64/v8 -t $(FRONTEND_NAME):$(VERSION) .
web-db-tunnel:
# Open a connection to the remote db via the bastion host
@aws ssm start-session \
--target i-01d07622aafe22350 \
--profile surveystream_dev \
--region ap-south-1 \
--document-name AWS-StartPortForwardingSession \
--parameters '{"portNumber":["5433"],"localPortNumber":["5432"]}'
container-up:
# Start a local version of the web app that uses the DoD dev database
@FRONTEND_NAME=${FRONTEND_NAME} \
VERSION=${VERSION} \
docker-compose -f docker-compose/docker-compose.e2e-test.yml -f docker-compose/docker-compose.override.yml up --exit-code-from cypress;
container-down:
@FRONTEND_NAME=${FRONTEND_NAME} \
VERSION=${VERSION} \
docker-compose -f docker-compose/docker-compose.remote-dev-db.yml down