From 8ffe0011fc24e3e0bcfac2ba624c526e1b033224 Mon Sep 17 00:00:00 2001 From: stephen schuresko Date: Mon, 17 Feb 2025 22:51:06 -0500 Subject: [PATCH] feat: update Dockerfile to copy all Python files and increment version in Makefile; add README with project details --- Dockerfile | 2 +- Makefile | 2 +- README.md | 57 ++++++++++++++++++++++++++++++++++++++++++++++++++++++ 3 files changed, 59 insertions(+), 2 deletions(-) diff --git a/Dockerfile b/Dockerfile index 6c62ee3..1955847 100644 --- a/Dockerfile +++ b/Dockerfile @@ -11,6 +11,6 @@ COPY ./requirements.txt /code/requirements.txt RUN pip install --no-cache-dir --upgrade -r /code/requirements.txt -COPY ./papi.py /code/ +COPY ./*.py /code/ CMD ["python3", "papi.py", "--port", "8912"] \ No newline at end of file diff --git a/Makefile b/Makefile index 48ecfce..9e42220 100644 --- a/Makefile +++ b/Makefile @@ -1,5 +1,5 @@ ENV=dev -VER=2 +VER=3 TAG=${ENV}-${VER} REGISTRY=kube-reg.fairfaxmedia.net SVC=papi/svc1 diff --git a/README.md b/README.md index e69de29..c7cd541 100644 --- a/README.md +++ b/README.md @@ -0,0 +1,57 @@ +# Posts API + +This is the Posts API project, a simple API for managing blog posts. + +## Table of Contents +- [Installation](#installation) +- [Usage](#usage) +- [Endpoints](#endpoints) +- [Contributing](#contributing) +- [License](#license) + +## Installation + +1. Clone the repository: + ```bash + git clone https://git.fairfaxmedia.net/posts-api/papi-py.git + ``` +2. Navigate to the project directory: + ```bash + cd papi-py + ``` +3. Install the dependencies: + ```bash + pip install -r requirements.txt + ``` + +## Usage + +To start the server, run: +```bash +python3 papi.py +``` + +## Endpoints + +### GET /posts +Retrieve a list of all posts. + +### POST /posts +Create a new post. + +### GET /posts/{id} +Retrieve a specific post by ID. + +### PUT /posts/{id} +Update a specific post by ID. + +### DELETE /posts/{id} +Delete a specific post by ID. + +## Contributing + +Contributions are welcome! Please open an issue or submit a pull request. + +## License + +This project is licensed under the MIT License. See the [LICENSE](LICENSE) file for details. \ No newline at end of file