Pass PayPal client ID as build arg for client-side bundle

NEXT_PUBLIC_* vars must be available at build time to be inlined
into the client JS bundle. Added NEXT_PUBLIC_PAYPAL_CLIENT_ID as
a Docker build arg so the PayPal checkout button works in the browser.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
Jeff Emmett 2026-02-13 14:34:38 -07:00
parent 09567cedad
commit 518f08e8e6
2 changed files with 3 additions and 0 deletions

View File

@ -12,10 +12,12 @@ COPY . .
# Build args
ARG DIRECTUS_API_TOKEN
ARG NEXT_PUBLIC_PAYPAL_CLIENT_ID
# Set environment for build
ENV NEXT_PUBLIC_DIRECTUS_URL=https://katheryn-cms.jeffemmett.com
ENV DIRECTUS_API_TOKEN=${DIRECTUS_API_TOKEN}
ENV NEXT_PUBLIC_PAYPAL_CLIENT_ID=${NEXT_PUBLIC_PAYPAL_CLIENT_ID}
ENV NEXT_TELEMETRY_DISABLED=1
# Build the application

View File

@ -5,6 +5,7 @@ services:
dockerfile: Dockerfile
args:
- DIRECTUS_API_TOKEN=katheryn-frontend-readonly-8591de0316ded82fab45328cf1e49cb1
- NEXT_PUBLIC_PAYPAL_CLIENT_ID=${NEXT_PUBLIC_PAYPAL_CLIENT_ID}
container_name: katheryn-frontend
restart: unless-stopped
env_file: