Skip to content

Commit a307796

Browse files
committed
updates
1 parent dc48f4c commit a307796

File tree

1 file changed

+33
-0
lines changed

1 file changed

+33
-0
lines changed

buildspec.yml

Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
version: 0.2
2+
3+
env:
4+
variables:
5+
AWS_REGION: "us-west-1"
6+
REACT_APP_API_SERVICE_URL: "http://localhost:5004"
7+
8+
phases:
9+
pre_build:
10+
commands:
11+
- echo logging in to ecr...
12+
- >
13+
aws ecr get-login-password --region $AWS_REGION \
14+
| docker login --username AWS --password-stdin $AWS_ACCOUNT_ID.dkr.ecr.$AWS_REGION.amazonaws.com
15+
build:
16+
commands:
17+
- echo building images...
18+
- >
19+
docker build \
20+
-f services/users/Dockerfile.prod \
21+
-t $AWS_ACCOUNT_ID.dkr.ecr.$AWS_REGION.amazonaws.com/test-driven-users:prod \
22+
./services/users
23+
- >
24+
docker build \
25+
-f services/client/Dockerfile.prod \
26+
-t $AWS_ACCOUNT_ID.dkr.ecr.$AWS_REGION.amazonaws.com/test-driven-client:prod \
27+
--build-arg NODE_ENV=production \
28+
--build-arg REACT_APP_API_SERVICE_URL=$REACT_APP_API_SERVICE_URL \
29+
./services/client
30+
post_build:
31+
commands:
32+
- docker push $AWS_ACCOUNT_ID.dkr.ecr.$AWS_REGION.amazonaws.com/test-driven-users:prod
33+
- docker push $AWS_ACCOUNT_ID.dkr.ecr.$AWS_REGION.amazonaws.com/test-driven-client:prod

0 commit comments

Comments
 (0)