generated from Arquisoft/wiq_0
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
1 changed file
with
8 additions
and
11 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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"] |