first commit

This commit is contained in:
Mateusz Gruszczyński
2026-02-17 09:04:09 +01:00
commit c0afc1554d
32 changed files with 7217 additions and 0 deletions

38
Dockerfile Normal file
View File

@@ -0,0 +1,38 @@
FROM python:3.14-alpine
WORKDIR /app
RUN apk add --no-cache \
gcc \
musl-dev \
linux-headers \
curl
COPY requirements.txt .
RUN pip install --no-cache-dir -r requirements.txt
COPY . .
RUN mkdir -p /app/geoip_db /app/static /app/templates
ENV FLASK_HOST=0.0.0.0
ENV FLASK_PORT=5000
ENV FLASK_DEBUG=False
ENV PYTHONUNBUFFERED=1
EXPOSE ${FLASK_PORT:-5000}
HEALTHCHECK --interval=30s --timeout=10s --start-period=40s --retries=3 \
CMD curl -f http://localhost:${FLASK_PORT:-5000}/ || exit 1
CMD gunicorn --bind 0.0.0.0:${FLASK_PORT:-5000} \
--workers 1 \
--threads 8 \
--timeout 900 \
--graceful-timeout 900 \
--keep-alive 300 \
--access-logfile - \
--error-logfile - \
--log-level info \
app:app