The stack created an empty CodeCommit repository - demo-app
. Now we will populate it with a sample demo application.
cd ~/environment
git clone https://github.com/smuralee/nginx-example.git
Change the remote origin to the CodeCommit repository. We fetch the repository URL
cd ~/environment/nginx-example
git remote set-url origin $(aws codecommit get-repository --repository-name demo-app | jq -r '.repositoryMetadata.cloneUrlHttp')
git remote -v
index.html
. We change the background-color
to green
<head>
<title>Demo Application</title>
</head>
<body style="background-color: green;">
<h1 style="color: white; text-align: center;">
Demo application - hosted with ECS
</h1>
</body>
git add .
git commit -m "Changed background to green"
git push