This commit is contained in:
K Car
2025-07-10 09:25:19 +01:00
parent a7de5af021
commit 5bf9e53449
11 changed files with 457 additions and 76 deletions
+4 -13
View File
@@ -9,16 +9,13 @@ RUN corepack prepare [email protected] --activate
# Copy package files
COPY package.json yarn.lock ./
COPY whisperlive-frontend/package.json ./whisperlive-frontend/
# Now run yarn install
RUN yarn install
# Copy source files
COPY whisperlive-frontend ./whisperlive-frontend
COPY . ./
# Build the application
RUN yarn workspace whisperlive-frontend build
RUN yarn build
# Production stage
FROM nginx:alpine
@@ -26,17 +23,11 @@ FROM nginx:alpine
# Create SSL directory
RUN mkdir -p /etc/nginx/ssl
# Create a win/macos switcher
ARG BUILD_OS
ENV BUILD_OS=${BUILD_OS}
ARG NGINX_MODE
ENV NGINX_MODE=${NGINX_MODE}
# Copy nginx configuration
COPY whisperlive-frontend/nginx/nginx-${BUILD_OS}-${NGINX_MODE:-dev}.conf /etc/nginx/conf.d/default.conf
COPY nginx/nginx.conf /etc/nginx/conf.d/default.conf
# Copy built files from builder
COPY --from=builder /app/whisperlive-frontend/dist /usr/share/nginx/html
COPY --from=builder /app/dist /usr/share/nginx/html
# Start nginx
CMD ["nginx", "-g", "daemon off;"]