Skip to content

Commit

Permalink
fix: Carrega SECRET_KEY no tempo de build no Dockerfile
Browse files Browse the repository at this point in the history
  • Loading branch information
vitorbaptista committed Sep 16, 2024
1 parent 675b806 commit df98b0a
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -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 \
Expand Down

0 comments on commit df98b0a

Please # to comment.