From 3917b41968527fbc586f983a4a1a3ef67cda377c Mon Sep 17 00:00:00 2001 From: Karl Date: Thu, 17 Jul 2025 16:02:01 +0100 Subject: [PATCH] hmmm --- config.py.sample | 15 --------------- dockerfile | 5 ++++- gunicorn.conf.py | 3 ++- 3 files changed, 6 insertions(+), 17 deletions(-) delete mode 100644 config.py.sample diff --git a/config.py.sample b/config.py.sample deleted file mode 100644 index 30ba662..0000000 --- a/config.py.sample +++ /dev/null @@ -1,15 +0,0 @@ -# config.py - -class Config: - DEBUG = False - BASE_URL = '' # Set your base URL here - HOST = '0.0.0.0' - PORT = 5000 - OCR_ENABLED = False - TEXT_INPUT_ENABLED = False - -class DevelopmentConfig(Config): - DEBUG = True - -class ProductionConfig(Config): - BASE_URL = '' # Production base URL diff --git a/dockerfile b/dockerfile index f5acf97..4ef2442 100644 --- a/dockerfile +++ b/dockerfile @@ -20,6 +20,7 @@ WORKDIR /app COPY --from=builder /install /usr/local COPY app.py . +COPY config.py . COPY gunicorn.conf.py . COPY run.sh . COPY VERSION . @@ -34,7 +35,9 @@ ARG VERSION RUN echo $VERSION > VERSION # Create a non-root user -RUN useradd --create-home appuser +RUN useradd --create-home appuser && \ + mkdir -p /app/tmp && \ + chown -R appuser:appuser /app/tmp USER appuser EXPOSE 5000 diff --git a/gunicorn.conf.py b/gunicorn.conf.py index 11ee732..b993d20 100644 --- a/gunicorn.conf.py +++ b/gunicorn.conf.py @@ -7,4 +7,5 @@ os.environ['FLASK_ENV'] = 'production' loglevel = "info" workers = 2 bind = "0.0.0.0:5000" -timeout = 120 \ No newline at end of file +timeout = 120 +worker_tmp_dir = "/app/tmp" \ No newline at end of file