|
@@ -4,6 +4,7 @@
|
|
|
# Esto para que la imagen sea más liviana y no incluya nada más que el build de producción y nginx
|
|
# Esto para que la imagen sea más liviana y no incluya nada más que el build de producción y nginx
|
|
|
|
|
|
|
|
FROM node:14-alpine AS builder
|
|
FROM node:14-alpine AS builder
|
|
|
|
|
+ARG REACT_APP_API_URL
|
|
|
ENV NODE_ENV production
|
|
ENV NODE_ENV production
|
|
|
# Add a work directory
|
|
# Add a work directory
|
|
|
WORKDIR /app
|
|
WORKDIR /app
|
|
@@ -14,6 +15,7 @@ RUN npm install --production
|
|
|
# Copy app files
|
|
# Copy app files
|
|
|
COPY ./app .
|
|
COPY ./app .
|
|
|
# Build the app
|
|
# Build the app
|
|
|
|
|
+ENV REACT_APP_API_URL=${REACT_APP_API_URL}
|
|
|
RUN npm run build
|
|
RUN npm run build
|
|
|
|
|
|
|
|
# Bundle static assets with nginx
|
|
# Bundle static assets with nginx
|