Add Docker deployment

This commit is contained in:
Ján Pták 2026-06-04 17:09:25 +02:00
parent 6078c734c8
commit 10c45de1d7
3 changed files with 37 additions and 0 deletions

9
.dockerignore Normal file
View File

@ -0,0 +1,9 @@
.venv/
.git/
__pycache__/
*.pyc
*.log
data/*.sqlite
data/*.db
data/*.json

19
Dockerfile Normal file
View File

@ -0,0 +1,19 @@
FROM python:3.11-slim
WORKDIR /app
ENV PYTHONDONTWRITEBYTECODE=1
ENV PYTHONUNBUFFERED=1
COPY requirements.txt .
RUN pip install --no-cache-dir -r requirements.txt
COPY app ./app
COPY scripts ./scripts
RUN mkdir -p data
EXPOSE 8000
CMD ["uvicorn", "app.main:app", "--host", "0.0.0.0", "--port", "8000"]

9
docker-compose.yml Normal file
View File

@ -0,0 +1,9 @@
services:
zp-agent-api:
build: .
container_name: zp-agent-api
ports:
- "8000:8000"
volumes:
- ./data:/app/data
restart: unless-stopped