Add Dockerfile

This commit is contained in:
2025-12-10 10:04:45 +11:00
parent 8601579532
commit 2dde4e88b1

23
Dockerfile Normal file
View File

@@ -0,0 +1,23 @@
FROM python:3.12-slim
WORKDIR /app
# Install dependencies
COPY requirements.txt .
RUN pip install --no-cache-dir -r requirements.txt
# Copy application
COPY . .
# Create data directory
RUN mkdir -p /app/data
# Set environment variables
ENV FLASK_APP=app.py
ENV DATABASE_URL=sqlite:///data/timekeeper.db
# Expose port
EXPOSE 5000
# Run with gunicorn
CMD ["gunicorn", "--bind", "0.0.0.0:5000", "--workers", "2", "app:app"]