This commit is contained in:
David Arranz 2024-09-06 18:17:33 +02:00
parent 6b923a6921
commit 445e820ef5

View File

@ -12,26 +12,26 @@ ENV NODE_ENV $NODE_ENV
WORKDIR /api
COPY package.json /api/package.json
RUN yarn install
#RUN yarn install
# Copiar el código de la aplicación
COPY . /api
RUN yarn run build
#RUN yarn run build
# RUN
FROM builder AS prod
#FROM builder AS prod
WORKDIR /api
#WORKDIR /api
COPY package.json yarn.lock ./
RUN yarn install --production
#COPY package.json yarn.lock ./
#RUN yarn install --production
COPY --from=builder /dist ./dist
#COPY --from=builder /dist ./dist
# Exponer el puerto que la API usa
EXPOSE 3000
#EXPOSE 3000
# Comando para correr la aplicación
CMD ["node", "dist/server/index.js"]
#CMD ["node", "dist/server/index.js"]