Skip to content

Commit

Permalink
fix dockerfile for vite
Browse files Browse the repository at this point in the history
  • Loading branch information
cogentapps committed Jul 9, 2023
1 parent 4f5e7fb commit a13fff3
Showing 1 changed file with 4 additions and 9 deletions.
13 changes: 4 additions & 9 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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
Expand All @@ -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

Expand Down

0 comments on commit a13fff3

Please sign in to comment.