Set HCAPTCHA_SITE_KEY as a build environment variable
Added NEXT_PUBLIC_HCAPTCHA_SITE_KEY to the Dockerfile to pass the hCaptcha site key as an environment variable during the build process. This ensures the key is appropriately injected into the Next.js build.
This commit is contained in:
@@ -13,6 +13,9 @@ RUN npm ci
|
|||||||
# Copy entire project
|
# Copy entire project
|
||||||
COPY . .
|
COPY . .
|
||||||
|
|
||||||
|
# Set it as an environment variable for the build process
|
||||||
|
ENV NEXT_PUBLIC_HCAPTCHA_SITE_KEY=${HCAPTCHA_SITE_KEY}
|
||||||
|
|
||||||
# Build the Next.js app
|
# Build the Next.js app
|
||||||
RUN npm run build
|
RUN npm run build
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user