Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/shaggyyy2002/demo-pipeline
https://github.com/shaggyyy2002/demo-pipeline
Last synced: about 18 hours ago
JSON representation
- Host: GitHub
- URL: https://github.com/shaggyyy2002/demo-pipeline
- Owner: shaggyyy2002
- Created: 2023-10-19T07:30:22.000Z (about 1 year ago)
- Default Branch: main
- Last Pushed: 2023-10-19T08:55:26.000Z (about 1 year ago)
- Last Synced: 2023-10-19T09:43:20.746Z (about 1 year ago)
- Language: Dockerfile
- Size: 1.95 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 2
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Python App Deployment using Github Actions
## Overview:
I have created a basic Python app, with task to deploy it using Github Actions for the DevOps Project## Installation Guide:
To start the app on your local machine make sure to have git, docker & docker-compose already installed.### Clone the Repo
```sh
git clone https://github.com/shaggyyy2002/demo-pipeline.git
```### Start app Using Docker
- Build Docker Image:
```sh
docker build -t python-app .
```
- Run Docker Image as Container:
```sh
docker run -d -p 5000:5000 --name pearlthoughts python-app
```### OR
### Start using Docker-Compose
- Make sure you're in the root folder and paste the command in your terminal
```sh
docker-compose up
```## CI-CD Pipeline
**CI Pipeline:**
- Our CI Pipeline helps us to build and push our Docker Image to our Personal Repository.
- It creates a push everytime we add something to our main branch.
- We have also setup our Docker Login credentials onto our Github Secrets.
- Once all the process is done it pushed our dockerimage to our `nitin03/python-app` repo on DockerHub with a `latest` tag.**CD Pipeline:**
- Once the CI pipeline is done only then our CD pipeline will start running because of the `workflow_run`.
- To run our docker image as a container we have setup our self hosted runner onto our Github Repo.
- The next steps our Pipeline will follow are
- Pull the docker-image from our DockerHub repo.
- Delete our old container running the same image if any.
- Once done it will start a new contaier using the latest Docker-Image from our DockerHub.## Post Deployment