-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathbuildspec.yml
33 lines (29 loc) · 1.21 KB
/
buildspec.yml
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
version: 0.2
phases:
pre_build:
commands:
- echo Logging in to Amazon ECR...
- aws ecr get-login-password --region ap-northeast-2 | docker login --username AWS --password-stdin 294951093594.dkr.ecr.ap-northeast-2.amazonaws.com/frontend
build:
commands:
- echo Building the Docker image...
- >
docker build
--build-arg NEXT_PUBLIC_KAKAO_CLIENT_ID=$NEXT_PUBLIC_KAKAO_CLIENT_ID
--build-arg NEXT_PUBLIC_KAKAO_JS=$NEXT_PUBLIC_KAKAO_JS
--build-arg NEXT_PUBLIC_KAKAO_JS_KEY=$NEXT_PUBLIC_KAKAO_JS_KEY
--build-arg NEXT_PUBLIC_PWA_KEY=$NEXT_PUBLIC_PWA_KEY
--build-arg NEXT_PUBLIC_GA_MEASUREMENT_ID=$NEXT_PUBLIC_GA_MEASUREMENT_ID
--build-arg NEXT_PUBLIC_SERVER_URI=https://about-back.kro.kr
--build-arg NEXT_PUBLIC_NEXTAUTH_URL=$NEXT_PUBLIC_NEXTAUTH_URL
--build-arg NEXTAUTH_URL=https://about-front.kro.kr
-t next-app .
- docker tag next-app 294951093594.dkr.ecr.ap-northeast-2.amazonaws.com/frontend:latest
post_build:
commands:
- echo Pushing the Docker image to ECR...
- docker push 294951093594.dkr.ecr.ap-northeast-2.amazonaws.com/frontend:latest
artifacts:
files:
- appspec.yml
- scripts/**