Update.
This commit is contained in:
parent
b374f7cd4f
commit
4befae4d2f
31
Dockerfile
Normal file
31
Dockerfile
Normal file
@ -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"]
|
||||||
17
docker-compose.yml
Normal file
17
docker-compose.yml
Normal file
@ -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
|
||||||
@ -1,13 +1,14 @@
|
|||||||
aiohttp
|
aiohttp==3.9.1
|
||||||
jinja2
|
jinja2==3.1.2
|
||||||
aiohttp_session
|
sqlalchemy==2.0.23
|
||||||
bcrypt
|
dulwich==0.21.6
|
||||||
python-dotenv
|
pydantic==2.12.3
|
||||||
aiosmtplib
|
click==8.1.7
|
||||||
aiojobs
|
pytest==8.3.0
|
||||||
aiofiles
|
pytest-asyncio==0.23.0
|
||||||
pytest
|
docker==7.0.0
|
||||||
pytest-aiohttp
|
aiofiles==23.2.1
|
||||||
aiohttp-test-utils
|
Pillow==10.2.0
|
||||||
pytest-mock
|
pytest-cov==4.1.0
|
||||||
pillow
|
rich==13.7.0
|
||||||
|
tqdm==4.66.1
|
||||||
Loading…
Reference in New Issue
Block a user