forked from sakshi-cse/travel-website
-
Notifications
You must be signed in to change notification settings - Fork 0
/
buildspec.yaml
29 lines (27 loc) · 896 Bytes
/
buildspec.yaml
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
version: 0.2
phases:
install:
runtime-versions:
nodejs: 18
pre_build:
commands:
- aws ecr-public get-login-password --region us-east-1 | docker login --username AWS --password-stdin public.ecr.aws/j6r0i7r3
build:
commands:
- echo Building Docker image...
- docker build -t nodejs-app-task-1 .
- echo Pushing Docker image to ECR...
- docker tag nodejs-app-task-1:latest public.ecr.aws/j6r0i7r3/node-app:latest
- docker push public.ecr.aws/j6r0i7r3/node-app:latest
post_build:
commands:
- echo Build completed on date
- echo Creating image definitions file...
- echo '[{"name":"node-app","imageUri":"public.ecr.aws/j6r0i7r3/node-app:latest","containerPort":3000}]' > imagedefinitions.json
artifacts:
files:
- '**/*'
secondary-artifacts:
imagedefinitions:
files:
- imagedefinitions.json