mirror of
https://github.com/TheRealOwenRees/chess-scribe-website.git
synced 2026-07-23 01:46:57 +00:00
add VITE client vars to build
This commit is contained in:
@@ -32,6 +32,12 @@ jobs:
|
|||||||
tags: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}
|
tags: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}
|
||||||
cache-from: type=gha
|
cache-from: type=gha
|
||||||
cache-to: type=gha,mode=max
|
cache-to: type=gha,mode=max
|
||||||
|
build-args: |
|
||||||
|
VITE_API_BASE_URL=http://chess-pdf-api:5000/api/v1
|
||||||
|
VITE_MATOMO_URL=https://analytics.owenrees.eu
|
||||||
|
VITE_MATOMO_SITE_ID=3
|
||||||
|
VITE_MAINTENANCE_MODE=
|
||||||
|
VITE_MAINTENANCE_MODE_MESSAGE=ChessScribe is currently undergoing maintenance. Some features may be unavailable.
|
||||||
|
|
||||||
deploy:
|
deploy:
|
||||||
needs: publish
|
needs: publish
|
||||||
|
|||||||
+15
@@ -1,6 +1,21 @@
|
|||||||
# --- Stage 1: Build Stage ---
|
# --- Stage 1: Build Stage ---
|
||||||
FROM node:24-alpine AS builder
|
FROM node:24-alpine AS builder
|
||||||
WORKDIR /app
|
WORKDIR /app
|
||||||
|
|
||||||
|
# 1. Declare the build-time arguments Vite needs
|
||||||
|
ARG VITE_API_BASE_URL
|
||||||
|
ARG VITE_MATOMO_URL
|
||||||
|
ARG VITE_MATOMO_SITE_ID
|
||||||
|
ARG VITE_MAINTENANCE_MODE
|
||||||
|
ARG VITE_MAINTENANCE_MODE_MESSAGE
|
||||||
|
|
||||||
|
# 2. Assign them to environment variables so Vite detects them
|
||||||
|
ENV VITE_API_BASE_URL=$VITE_API_BASE_URL
|
||||||
|
ENV VITE_MATOMO_URL=$VITE_MATOMO_URL
|
||||||
|
ENV VITE_MATOMO_SITE_ID=$VITE_MATOMO_SITE_ID
|
||||||
|
ENV VITE_MAINTENANCE_MODE=$VITE_MAINTENANCE_MODE
|
||||||
|
ENV VITE_MAINTENANCE_MODE_MESSAGE=$VITE_MAINTENANCE_MODE_MESSAGE
|
||||||
|
|
||||||
COPY package.json pnpm-lock.yaml pnpm-workspace.yaml ./
|
COPY package.json pnpm-lock.yaml pnpm-workspace.yaml ./
|
||||||
RUN corepack enable pnpm && pnpm i --frozen-lockfile
|
RUN corepack enable pnpm && pnpm i --frozen-lockfile
|
||||||
COPY . .
|
COPY . .
|
||||||
|
|||||||
Reference in New Issue
Block a user