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
|
||||
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
|
||||
Loading…
Reference in New Issue
Block a user