Skip to content

Commit

Permalink
Update Dockerfile
Browse files Browse the repository at this point in the history
  • Loading branch information
uo288347 authored Mar 11, 2024
1 parent c67a059 commit 05fd626
Showing 1 changed file with 8 additions and 11 deletions.
19 changes: 8 additions & 11 deletions webapp/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,21 +1,18 @@
FROM node:20

COPY . /app
WORKDIR /app

# Copiar solo el archivo package.json
COPY package.json .

# Install dependencies
#Install the dependencies
RUN npm install

# Copiar el resto del código
COPY . .
ARG API_URI="http://localhost:8000"
ENV REACT_APP_API_ENDPOINT=$API_URI

# Build the app
#Create an optimized version of the webapp
RUN npm run build

# Instalar serve
RUN npm install serve

#CMD ["serve", "-s", "build"]

#Execute npm run prod to run the server
CMD [ "npm", "run", "prod" ]
#CMD ["npm", "start"]

0 comments on commit 05fd626

Please sign in to comment.