This commit is contained in:
Karl 2025-07-17 16:02:01 +01:00
parent bc01f4d980
commit 3917b41968
3 changed files with 6 additions and 17 deletions

View File

@ -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

View File

@ -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

View File

@ -7,4 +7,5 @@ os.environ['FLASK_ENV'] = 'production'
loglevel = "info"
workers = 2
bind = "0.0.0.0:5000"
timeout = 120
timeout = 120
worker_tmp_dir = "/app/tmp"