From a13fff35da61ad8af261e3fefe88013f8cb3cf54 Mon Sep 17 00:00:00 2001 From: Cogent Apps Date: Sun, 9 Jul 2023 20:45:52 +0000 Subject: [PATCH] fix dockerfile for vite --- Dockerfile | 13 ++++--------- 1 file changed, 4 insertions(+), 9 deletions(-) diff --git a/Dockerfile b/Dockerfile index de9cb55..b332083 100644 --- a/Dockerfile +++ b/Dockerfile @@ -14,9 +14,12 @@ COPY ./app/tsconfig.json ./ # Install Node.js dependencies RUN npm install +COPY ./app/vite.config.js ./ + # Copy public, and src directories COPY ./app/public ./public COPY ./app/src ./src +COPY ./app/index.html ./ # Set environment variables ENV NODE_ENV=production @@ -29,14 +32,6 @@ FROM node:19-bullseye-slim AS server # Set the working directory WORKDIR /app -# Update the package index and install required dependencies -# RUN apt-get update && \ -# apt-get install -y \ -# curl \ -# build-essential \ -# libssl-dev \ -# openssl - COPY ./server/package.json ./server/tsconfig.json ./ # Install Node.js dependencies from package.json @@ -45,7 +40,7 @@ RUN npm install # Copy the rest of the application code into the working directory COPY ./server/src ./src -RUN CI=true sh -c "cd /app && mkdir data && npm run start && rm -rf data" +RUN CI=true sh -c "cd /app && npm run start && rm -rf data" COPY --from=build /app/build /app/public