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:36:46 +02:00
parent 21d53bc089
commit 810b2871d2

View File

@@ -18,7 +18,7 @@ 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"
RUN echo "NEXT_PUBLIC_HCAPTCHA_SITE_KEY=${HCAPTCHA_SITE_KEY}"
# Build the Next.js app
RUN npm run build