diff --git a/Dockerfile b/Dockerfile new file mode 100644 index 0000000..e038925 --- /dev/null +++ b/Dockerfile @@ -0,0 +1,31 @@ +# Use the latest Python 3.13 slim image for a lightweight base +FROM python:3.13-slim + +# Set environment variables +ENV PYTHONUNBUFFERED=1 +ENV PYTHONDONTWRITEBYTECODE=1 + +# Set work directory +WORKDIR /app + +# Install system dependencies if needed (for Dulwich, etc.) +RUN apt-get update && apt-get install -y \ + git \ + curl \ + && rm -rf /var/lib/apt/lists/* + +# Copy requirements file +COPY requirements.txt . + +# Install Python dependencies +RUN pip install --no-cache-dir --upgrade pip && \ + pip install --no-cache-dir -r requirements.txt + +# Copy project +COPY . . + +# Expose port +EXPOSE 9001 + +# Run the application +CMD ["python", "-m", "retoors.main", "--host", "0.0.0.0", "--port", "9001"] diff --git a/docker-compose.yml b/docker-compose.yml new file mode 100644 index 0000000..be7dbf1 --- /dev/null +++ b/docker-compose.yml @@ -0,0 +1,17 @@ +version: '3.8' + +services: + app: + build: . + ports: + - "127.0.0.1:9001:9001" + volumes: + - ./:/app + environment: + - PYTHONPATH=/app + restart: unless-stopped + healthcheck: + test: ["CMD", "curl", "-f", "http://localhost:8080/health"] + interval: 30s + timeout: 10s + retries: 3 diff --git a/requirements.txt b/requirements.txt index 7214ae4..86dbf3a 100644 --- a/requirements.txt +++ b/requirements.txt @@ -1,13 +1,14 @@ -aiohttp -jinja2 -aiohttp_session -bcrypt -python-dotenv -aiosmtplib -aiojobs -aiofiles -pytest -pytest-aiohttp -aiohttp-test-utils -pytest-mock -pillow +aiohttp==3.9.1 +jinja2==3.1.2 +sqlalchemy==2.0.23 +dulwich==0.21.6 +pydantic==2.12.3 +click==8.1.7 +pytest==8.3.0 +pytest-asyncio==0.23.0 +docker==7.0.0 +aiofiles==23.2.1 +Pillow==10.2.0 +pytest-cov==4.1.0 +rich==13.7.0 +tqdm==4.66.1 \ No newline at end of file