From 21d53bc0893808beda0628edf89a19d3ef7ca22d Mon Sep 17 00:00:00 2001 From: Thatsaphorn Atchariyaphap Date: Sun, 1 Jun 2025 20:30:54 +0200 Subject: [PATCH] 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. --- frontend/Dockerfile | 3 +++ 1 file changed, 3 insertions(+) diff --git a/frontend/Dockerfile b/frontend/Dockerfile index e9b1acb..802b149 100644 --- a/frontend/Dockerfile +++ b/frontend/Dockerfile @@ -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