Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion buildspec.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ phases:
- echo Logging in to Amazon ECR...
- aws --version
- $(aws ecr get-login --region $AWS_DEFAULT_REGION --no-include-email)
- REPOSITORY_URI=077708451457.dkr.ecr.ap-south-1.amazonaws.com/node-app
- REPOSITORY_URI=288408890206.dkr.ecr.ap-south-1.amazonaws.com/oriental
- COMMIT_HASH=$(echo $CODEBUILD_RESOLVED_SOURCE_VERSION | cut -c 1-7)
- IMAGE_TAG=build-$(echo $CODEBUILD_BUILD_ID | awk -F":" '{print $2}')
build:
Expand Down
10 changes: 5 additions & 5 deletions deploy.sh
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,12 @@

# This is to demo

node_app=`docker ps -a | grep nodeapp | awk '{print $NF}'`
if [ $node_app=='nodeapp' ]; then
echo "nodeapp is running, lets delete"
docker rm -f nodeapp
node_app=`docker ps -a | grep dibyoFargateContainer | awk '{print $NF}'`
if [ $node_app=='dibyoFargateContainer' ]; then
echo "dibyoFargateContainer is running, lets delete"
docker rm -f dibyoFargateContainer
fi

images=`docker images | grep kammana/nodejenkins | awk '{print $3}'`
docker rmi $images
docker run -d -p 8080:8080 --name nodeapp $1
docker run -d -p 8080:8080 --name dibyoFargateContainer $1
8 changes: 5 additions & 3 deletions server.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,11 @@ const HOST = '0.0.0.0';

// App
const app = express();
app.get('/', (req, res) => {
res.send('<h1 style="color:green;">Java Home App - version-10!!</h1> \n');
});


app.listen(PORT, HOST);
console.log(`Running on http://${HOST}:${PORT}`);

app.get('/', (req, res) => {
res.send('<h1 style="color:green;">Java Home App - 11 version 24th July` </h1> \n');
});