From 2f7a669095d6751842e8901c8db26a1ab1cef76c Mon Sep 17 00:00:00 2001 From: Jeroen Schweitzer Date: Thu, 11 Dec 2025 18:27:51 +0100 Subject: [PATCH] feat: add CI/CD pipeline and bump version to 1.0.0 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - Add Dockerfile for containerized deployment (Python 3.12-slim, port 8000) - Add Gitea Actions workflow triggered on release publish - Builds and pushes to git.schweitz.net registry with latest and version tags - Bump version to 1.0.0 marking production-ready release - Update CHANGELOG with CI/CD and deployment configuration 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 --- .gitea/workflows/build.yml | 27 +++++++++++++++++++++++++++ CHANGELOG.md | 21 ++++++++++++++++++++- Dockerfile | 17 +++++++++++++++++ pyproject.toml | 2 +- 4 files changed, 65 insertions(+), 2 deletions(-) create mode 100644 .gitea/workflows/build.yml create mode 100644 Dockerfile diff --git a/.gitea/workflows/build.yml b/.gitea/workflows/build.yml new file mode 100644 index 0000000..6a63fa0 --- /dev/null +++ b/.gitea/workflows/build.yml @@ -0,0 +1,27 @@ +name: Build and Push + +on: + release: + types: [published] + +jobs: + build: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + + - name: Login to Gitea Registry + uses: docker/login-action@v3 + with: + registry: git.schweitz.net + username: ${{ secrets.REGISTRY_USER }} + password: ${{ secrets.REGISTRY_PASSWORD }} + + - name: Build and push + uses: docker/build-push-action@v5 + with: + context: . + push: true + tags: | + git.schweitz.net/jpmschweitzer/tatlock:latest + git.schweitz.net/jpmschweitzer/tatlock:${{ github.ref_name }} diff --git a/CHANGELOG.md b/CHANGELOG.md index a8ab89b..5d54714 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -7,6 +7,23 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 ## [Unreleased] +## [1.0.0] - 2025-12-11 + +### Added +- **CI/CD Pipeline**: Release-triggered automated builds + - Dockerfile for containerized deployment (Python 3.12-slim, port 8000) + - Gitea Actions workflow triggered on release publish + - Builds and pushes to git.schweitz.net registry with latest and version tags + - Watchtower integration for automatic container updates +- **Portainer Stack**: Production deployment configuration + - Connects to docker-dataplane network for service discovery + - Integration with ollama, searxng, and redis-shared services + - Health check endpoint monitoring + - Resource limits (1 CPU, 1GB memory) + +### Changed +- Version bump to 1.0.0 marking production-ready release + ## [0.2.5] - 2025-12-07 ### Added @@ -297,7 +314,9 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 - CORS middleware - Exception handlers (OpenAI-compatible error format) -[Unreleased]: https://git.schweitz.net/jpmschweitzer/tatlock/compare/v0.2.0...main +[Unreleased]: https://git.schweitz.net/jpmschweitzer/tatlock/compare/v1.0.0...main +[1.0.0]: https://git.schweitz.net/jpmschweitzer/tatlock/compare/v0.2.5...v1.0.0 +[0.2.5]: https://git.schweitz.net/jpmschweitzer/tatlock/compare/v0.2.0...v0.2.5 [0.2.0]: https://git.schweitz.net/jpmschweitzer/tatlock/compare/v0.1.1...v0.2.0 [0.1.1]: https://git.schweitz.net/jpmschweitzer/tatlock/compare/v0.1.0...v0.1.1 [0.1.0]: https://git.schweitz.net/jpmschweitzer/tatlock/releases/tag/v0.1.0 diff --git a/Dockerfile b/Dockerfile new file mode 100644 index 0000000..faf674e --- /dev/null +++ b/Dockerfile @@ -0,0 +1,17 @@ +FROM python:3.12-slim + +WORKDIR /app + +RUN apt-get update && apt-get install -y curl \ + && rm -rf /var/lib/apt/lists/* + +COPY requirements.txt . +RUN pip install --no-cache-dir -r requirements.txt + +COPY src/ ./src/ + +ENV PYTHONPATH=/app + +EXPOSE 8000 + +CMD ["uvicorn", "src.main:app", "--host", "0.0.0.0", "--port", "8000", "--workers", "1"] diff --git a/pyproject.toml b/pyproject.toml index 511510e..1734832 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -4,7 +4,7 @@ build-backend = "setuptools.build_meta" [project] name = "tatlock" -version = "0.2.5" +version = "1.0.0" description = "OpenAI-compatible API with Ollama backend" requires-python = ">=3.12" dependencies = []