@@ -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
FROM node:14-alpine AS builder
+ARG REACT_APP_API_URL
ENV NODE_ENV production
# Add a work directory
WORKDIR /app
@@ -14,6 +15,7 @@ RUN npm install --production
# Copy app files
COPY ./app .
# Build the app
+ENV REACT_APP_API_URL=${REACT_APP_API_URL}
RUN npm run build
# Bundle static assets with nginx
@@ -1,4 +1,4 @@
-export const apiURL = process.env.API_URL || "http://localhost:8000/v1/";
+export const apiURL = process.env.REACT_APP_API_URL || "http://localhost:8000/v1/";
export default {
apiURL,