created deploy site shell script and made sure i am actually loading the api key from .env

This commit is contained in:
2025-12-07 22:31:32 +01:00
parent 0f82f926a3
commit 9eeb88e9ea
3 changed files with 45 additions and 0 deletions
+6
View File
@@ -2,6 +2,9 @@
FROM oven/bun:1 as builder
WORKDIR /app
# Declare build argument for the API key
ARG VITE_GPT_OSS_API_KEY
# Copy configuration files and install dependencies
# This layer is cached to speed up future builds
COPY package.json bun.lockb ./
@@ -9,6 +12,9 @@ COPY tsconfig.json tsconfig.node.json ./
COPY vite.config.ts postcss.config.js tailwind.config.ts ./
RUN bun install --frozen-lockfile
# Set it as an environment variable for Vite to pick up during build
ENV VITE_GPT_OSS_API_KEY=$VITE_GPT_OSS_API_KEY
# Copy the rest of the source code
COPY . .