feat(docker): add Dockerfile and docker-compose.yml for containerized deployment

This commit is contained in:
Antigravity committed 2026-10-05 10:45:49 +03:00
1 parent b5025b3966
commit 83f19168db
3 files changed
+49

No files matched your search

+11
View File
@@ -0,0 +1,11 @@
__pycache__/
*.py[cod]
*$py.class
.pytest_cache/
venv/
.git/
.env
data/
*.db
*.db-wal
*.db-shm
+21
View File
@@ -0,0 +1,21 @@
FROM python:3.12-slim
WORKDIR /app
# Install dependencies
COPY requirements.txt .
RUN pip install --no-cache-dir -r requirements.txt
# Copy application source
COPY . .
# Ensure data directory exists for SQLite WAL storage
RUN mkdir -p /app/data
ENV HOST=0.0.0.0 \
PORT=8002 \
PYTHONUNBUFFERED=1
EXPOSE 8002
CMD ["uvicorn", "app.main:app", "--host", "0.0.0.0", "--port", "8002"]
+17
View File
@@ -0,0 +1,17 @@
services:
study-web:
build: .
container_name: study-qpid-pro
restart: unless-stopped
ports:
- "127.0.0.1:8002:8002"
volumes:
- ./data:/app/data
environment:
- HOST=0.0.0.0
- PORT=8002
- DEBUG=False
- SECRET_KEY=study-qpid-pro-secret-key-change-in-prod
- ADMIN_USERNAME=admin
- ADMIN_PASSWORD=adminpass
- DB_PATH=/app/data/notes.db