Push to Gitea ๐Ÿš€

This commit is contained in:
2025-11-06 07:54:23 +01:00
parent a3bb1b3dd6
commit e39470e126
22 changed files with 2633 additions and 0 deletions

34
Dockerfile Normal file
View File

@@ -0,0 +1,34 @@
FROM python:3.12-alpine
ARG FLADO_DATABASE_URI=sqlite:////app/instance/flado.sqlite
ENV PYTHONDONTWRITEBYTECODE=1 \
PYTHONUNBUFFERED=1 \
FLASK_APP=flado.app:create_app \
FLADO_DATABASE_URI=${FLADO_DATABASE_URI}
WORKDIR /app
RUN addgroup -S app && adduser -S app -G app
# Install curl for healthcheck
RUN apk add --no-cache curl
COPY requirements.txt .
RUN pip install --no-cache-dir -r requirements.txt
COPY . .
RUN mkdir -p /app/instance && chown -R app:app /app/instance
VOLUME ["/app/instance"]
USER app
EXPOSE 5000
HEALTHCHECK --interval=30s --timeout=10s --start-period=5s --retries=3 \
CMD curl --fail --silent --show-error http://localhost:5000/health || exit 1
CMD ["sh", "-c", "mkdir -p /app/instance && flask db upgrade && gunicorn --bind 0.0.0.0:5000 --workers 2 --timeout 120 --access-logfile - --error-logfile - wsgi:app"]