Set HCAPTCHA key in .env file during Docker build

This change adds a step to create a `.env` file with the HCAPTCHA site key during the Docker build process. It ensures the environment variable is available for use within the container.
This commit is contained in:
2025-06-01 20:30:54 +02:00
parent eebabb5e53
commit 21d53bc089

View File

@@ -17,6 +17,9 @@ COPY . .
ARG HCAPTCHA_SITE_KEY
ENV NEXT_PUBLIC_HCAPTCHA_SITE_KEY=${HCAPTCHA_SITE_KEY}
# Create a .env file before build
RUN echo "NEXT_PUBLIC_HCAPTCHA_SITE_KEY=$HCAPTCHA_SITE_KEY"
# Build the Next.js app
RUN npm run build