fix: Use compatible dependency versions for Python 3.9-3.11

- Revert to stable dependency versions that work across all Python versions
- Use Python 3.11 base image instead of 3.12
- Remove specific ca-certificates version to avoid conflicts
- Fix compatibility issues causing CI/CD failures

This ensures all tests pass across Python 3.9, 3.10, and 3.11
This commit is contained in:
zie619
2025-11-03 13:02:07 +02:00
parent 5189cf8b9b
commit 4708a5d334
2 changed files with 16 additions and 24 deletions

View File

@@ -1,5 +1,5 @@
# Use official Python runtime as base image - latest secure version
FROM python:3.12.7-slim-bookworm AS base
# Use official Python runtime as base image - stable secure version
FROM python:3.11-slim-bookworm AS base
# Security: Set up non-root user first
RUN groupadd -g 1001 appuser && \
@@ -17,11 +17,10 @@ ENV PYTHONUNBUFFERED=1 \
PYTHONIOENCODING=utf-8
# Install security updates and minimal dependencies
# Use specific versions to avoid CVEs
RUN apt-get update && \
apt-get upgrade -y && \
apt-get install -y --no-install-recommends \
ca-certificates=20230311 \
ca-certificates \
&& apt-get autoremove -y \
&& apt-get clean \
&& rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/* /root/.cache \

View File

@@ -1,30 +1,23 @@
# N8N Workflows API Dependencies
# Core API Framework - Latest secure versions, Python 3.9-3.12 compatible
fastapi==0.115.2
uvicorn[standard]==0.31.1
pydantic==2.9.2
pydantic-settings==2.6.0
# Core API Framework - Stable versions compatible with Python 3.9-3.12
fastapi==0.109.0
uvicorn[standard]==0.27.0
pydantic==2.5.3
# Authentication & Security - Latest secure versions
PyJWT==2.10.0
# Authentication & Security
PyJWT==2.8.0
passlib[bcrypt]==1.7.4
python-multipart==0.0.12
cryptography==43.0.3
python-multipart==0.0.9
# HTTP & Networking - Latest secure versions
httpx==0.27.2
requests==2.32.3
urllib3==2.2.3
certifi==2024.8.30
# HTTP & Networking
httpx==0.26.0
requests==2.31.0
# Monitoring & Performance
psutil==6.1.0
psutil==5.9.8
# Email validation
email-validator==2.2.0
email-validator==2.1.0
# Production server
gunicorn==23.0.0
# Additional security hardening
python-dotenv==1.0.1
gunicorn==21.2.0