This is a basic API built with Flask, part of the boeronline/api-demo
repository. It comes with a Dockerfile for containerization and a GitHub Actions pipeline for CI/CD.
- Docker
- Python 3.x
- Flask
- Clone the repository.
git clone https://github.com/boeronline/api-demo.git
- Install the requirements.
pip install -r requirements.txt
- Run the app.
python app.py
- Build the Docker image.
docker build -t my-api:latest .
- Run the container.
docker run -p 5000:5000 my-api:latest
The .github/workflows/main.yml
file defines a GitHub Actions pipeline for building and pushing the Docker image to Sonatype Nexus.
- Checkout code
- Build Docker image
- Log in to Nexus
- Tag Docker image
- Push to Nexus
- Pipeline triggers on every push to
main
. - No security scans.
- No test stage.