Skip to content

Commit

Permalink
Update Dockerfile
Browse files Browse the repository at this point in the history
  • Loading branch information
copy2018 authored Oct 27, 2024
1 parent 9eea3d8 commit 1f43d40
Showing 1 changed file with 7 additions and 7 deletions.
14 changes: 7 additions & 7 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -10,16 +10,15 @@ WORKDIR /myspeed
# Clone the MySpeed repository from GitHub
RUN git clone https://github.com/gnmyt/myspeed.git .

# Install dependencies for the entire application
RUN yarn config set network-timeout 600000 # 10 minutes
RUN yarn install
# Install dependencies for the entire application (using npm for compatibility with package-lock.json)
RUN npm install --legacy-peer-deps

# Build the client application
RUN cd client && yarn install --force
# Build the client application using npm instead of yarn to avoid conflicts
RUN cd client && npm install --legacy-peer-deps
RUN cd client && npm run build

# Move built client files to the correct location
RUN mv client/build .
RUN mv client/build .

# Stage 2: Production
FROM node:18-alpine
Expand Down Expand Up @@ -49,4 +48,5 @@ EXPOSE 5216
# Start the application
CMD ["node", "server/server.js"]

ADD ./docker_entrypoint.sh /usr/local/bin/docker_entrypoint.sh
# Add the entrypoint script
ADD ./docker_entrypoint.sh /usr/local/bin/docker_entrypoint.sh

0 comments on commit 1f43d40

Please sign in to comment.