Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

q #94

Open
wants to merge 21 commits into
base: main
Choose a base branch
from
Open

q #94

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 appspec.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,4 +9,4 @@ hooks:
AfterInstall:
- location: scripts/start_container.sh
timeout: 300
runas: root
runas: root
8 changes: 4 additions & 4 deletions day-14/README.md
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
# AWS Continuous Integration Demo
## AWS Continuous Integration Demo

## Set Up GitHub Repository
## Set Up GitHub Repository

The first step in our CI journey is to set up a GitHub repository to store our Python application's source code. If you already have a repository, feel free to skip this step. Otherwise, let's create a new repository on GitHub by following these steps:
The first step in our CI journey is to set up a GitHub repository to store our Python application's source code. If you already have a repository, feel free to skip this step. Otherwise, let's create a new repository on GitHub by following these steps:

- Go to github.com and sign in to your account.
- Click on the "+" button in the top-right corner and select "New repository."
Expand Down Expand Up @@ -55,4 +55,4 @@ In this final step, we'll trigger the CI process by making a change to our GitHu
- Commit and push your changes to the branch configured in your AWS CodePipeline.
- Head over to the AWS CodePipeline console and navigate to your pipeline.
- You should see the pipeline automatically kick off as soon as it detects the changes in your repository.
- Sit back and relax while AWS CodePipeline takes care of the rest. It will fetch the latest code, trigger the build process with AWS CodeBuild, and deploy the application if you configured the deployment stage.
- Sit back and relax while AWS CodePipeline takes care of the rest. It will fetch the latest code, trigger the build process with AWS CodeBuild, and deploy the application if you configured the deployment stage.
2 changes: 1 addition & 1 deletion day-14/simple-python-app/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Base image
## Base image
FROM python:3.8

# Set the working directory inside the container
Expand Down
1 change: 1 addition & 0 deletions day-14/simple-python-app/buildspec.yml
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
#
version: 0.2

env:
Expand Down
4 changes: 2 additions & 2 deletions day-14/simple-python-app/start_container.sh
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
set -e

# Pull the Docker image from Docker Hub
echo
docker pull awsd43/simple-python-flask-app:latest

# Run the Docker image as a container
echo
docker run -d -p 5000:5000 awsd43/simple-python-flask-app:latest
3 changes: 2 additions & 1 deletion day-14/simple-python-app/stop_container.sh
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,5 @@
set -e

# Stop the running container (if any)
echo "Hi"
containerId= docker ps | awk -F " " {print $1}
docker rm -f ${containerId}
4 changes: 2 additions & 2 deletions scripts/start_container.sh
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
set -e

# Pull the Docker image from Docker Hub
docker pull abhishekf5/simple-python-flask-app
docker pull awsd43/simple-python-flask-app

# Run the Docker image as a container
docker run -d -p 5000:5000 abhishekf5/simple-python-flask-app
docker run -d -p 5000:5000 awsd43/simple-python-flask-app
3 changes: 2 additions & 1 deletion scripts/stop_container.sh
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,5 @@
set -e

# Stop the running container (if any)
echo "Hi"
containerid=`docker ps | awk -F " " '{print $1}'`
docker rm -f $containerid