updates
This commit is contained in:
+4
-13
@@ -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;"]
|
||||
Reference in New Issue
Block a user