FazBrowse GitHub Viewer
|
Trending
|
URL:
|
Home
Tools:
[Download Repo ZIP]
[View Raw Code]
[Original HTTPS Page]
angular2-app/scripts/deploy.sh at master · abrahamgit/angular2-app · GitHub
abrahamgit
/
angular2-app
Public
forked from
springboot-angular2-tutorial/angular2-app
Notifications
You must be signed in to change notification settings
Fork
0
Star
0
Code
Pull requests
0
Actions
Projects
Wiki
Security and quality
0
Insights
Additional navigation options
Code
Pull requests
Actions
Projects
Wiki
Security and quality
Insights
Expand file tree
Breadcrumbs
angular2-app
/
scripts
/
deploy.sh
Copy path
More file actions
More file actions
Latest commit
History
History
History
executable file
·
27 lines (20 loc) · 837 Bytes
Breadcrumbs
angular2-app
/
scripts
/
deploy.sh
Copy path
File metadata and controls
executable file
·
27 lines (20 loc) · 837 Bytes
Raw
Copy raw file
Download raw file
Open symbols panel
Edit and raw actions
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
#!
/usr/bin/env bash
set
-u
if
[
!
-v AWS_SESSION_TOKEN ]
;
then
source
./scripts/switch-role.sh
fi
readonly
DOCKER_NAME=micropost/frontend
readonly
AWS_ACCOUNT_NUMBER=
$(
aws sts get-caller-identity --output text --query
'
Account
'
)
readonly
IMAGE_URL=
${AWS_ACCOUNT_NUMBER}
.dkr.ecr.
${AWS_DEFAULT_REGION}
.amazonaws.com/
${DOCKER_NAME}
#
Build
PUBLIC_PATH=
"
https://cdn-
${ENV}
.hana053.com
"
yarn run build
#
Ensure docker repository exists
aws ecr describe-repositories --repository-names
${DOCKER_NAME}
>
/dev/null
2>&1
||
\
aws ecr create-repository --repository-name
${DOCKER_NAME}
#
Push to docker repository
eval
$(
aws ecr get-login
)
docker build -t
${DOCKER_NAME}
.
docker tag
${DOCKER_NAME}
:latest
${IMAGE_URL}
:latest
docker push
${IMAGE_URL}
:latest
#
Deploy
./scripts/ecs-deploy -c micropost -n frontend -i
${IMAGE_URL}
:latest
Back
|
FazBrowse Home
|
New Git URL