new file: Dockerfile

new file:   app.py
	new file:   requirements.txt
This commit is contained in:
SimolZimol
2025-12-12 04:11:38 +01:00
commit eb78f90d8f
3 changed files with 112 additions and 0 deletions

30
Dockerfile Normal file
View File

@@ -0,0 +1,30 @@
FROM python:3.10-slim
ENV PYTHONDONTWRITEBYTECODE=1 \
PYTHONUNBUFFERED=1 \
PIP_NO_CACHE_DIR=1 \
PORT=5000
WORKDIR /app
# Keep image minimal; add build tools only if future deps require them
RUN apt-get update -y && apt-get install -y --no-install-recommends \
build-essential \
&& rm -rf /var/lib/apt/lists/*
# Install dependencies (better layer caching)
COPY requirements.txt ./
RUN pip install --upgrade pip && pip install -r requirements.txt
# Copy application code
COPY app.py ./
COPY templates ./templates
COPY static ./static
# Environment variables from Coolify (if used)
ENV DEMO=$DEMO
EXPOSE 5000
# Production server (use shell form so $PORT expands in Coolify)
CMD gunicorn -w ${WEB_CONCURRENCY:-3} -b 0.0.0.0:${PORT:-5000} app:app