From a706dcf6a9b91ef2c3d1e1d28449b9b8e0e8187d Mon Sep 17 00:00:00 2001 From: IwanIDev Date: Thu, 19 Mar 2026 20:16:23 +0000 Subject: Add support for headless Drupal integration with environment variables and Docker setup - Create .env.example for environment variable configuration - Update Dockerfile to accept Drupal-related build arguments - Enhance docker_build.yml to pass environment variables during Docker build - Add drupalClient and env configuration for API interaction - Implement local development instructions and Docker deployment steps in README - Add drupal and mariadb services to docker-stack.yml for complete setup - Update package.json and bun.lock to include axios and drupal-jsonapi-params dependencies - Add TypeScript definitions for new environment variables --- Dockerfile | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) (limited to 'Dockerfile') diff --git a/Dockerfile b/Dockerfile index 8cd785f..c3bd0d5 100644 --- a/Dockerfile +++ b/Dockerfile @@ -3,13 +3,22 @@ FROM --platform=$BUILDPLATFORM oven/bun:latest AS build WORKDIR /app +ARG VITE_DRUPAL_BASE_URL +ARG VITE_DRUPAL_API_PREFIX=/jsonapi +ARG VITE_DRUPAL_AUTH_TOKEN + +ENV VITE_DRUPAL_BASE_URL=${VITE_DRUPAL_BASE_URL} +ENV VITE_DRUPAL_API_PREFIX=${VITE_DRUPAL_API_PREFIX} +ENV VITE_DRUPAL_AUTH_TOKEN=${VITE_DRUPAL_AUTH_TOKEN} + COPY package.json bun.lock* ./ RUN bun install --frozen-lockfile COPY . . RUN bun run build -# Production stage - targets the deployment platform +# Production stage + FROM nginx:alpine COPY --from=build /app/dist /usr/share/nginx/html -- cgit