diff --git a/Dockerfile b/Dockerfile index 062e2c3..8e06e55 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,16 +1,19 @@ # Build stage FROM python:3.9 AS builder +ARG SECRET_KEY + # Set environment variables ENV PYTHONDONTWRITEBYTECODE 1 ENV PYTHONUNBUFFERED 1 +ENV SECRET_KEY ${SECRET_KEY} + +# Validate SECRET_KEY +RUN [ -z "${SECRET_KEY}" ] && echo "ERROR: SECRET_KEY environment variable is not set or empty" && exit 1 || true # Set the working directory in the container WORKDIR /app -# Debug envs -RUN env - # Install system dependencies, including gettext RUN apt-get update && apt-get install -y \ gettext \