Frontend env arguments
This commit is contained in:
@ -58,8 +58,9 @@ services:
|
|||||||
build:
|
build:
|
||||||
context: ./frontend
|
context: ./frontend
|
||||||
dockerfile: Dockerfile
|
dockerfile: Dockerfile
|
||||||
|
args:
|
||||||
|
- REACT_APP_MACHINES_API_URL=http://localhost:10000
|
||||||
|
- REACT_APP_PRODUCTS_API_URL=http://localhost:10000
|
||||||
network_mode: "host"
|
network_mode: "host"
|
||||||
environment:
|
|
||||||
- REACT_APP_BACKEND_API_URL="http://localhost:10000"
|
|
||||||
depends_on:
|
depends_on:
|
||||||
- proxy
|
- proxy
|
||||||
|
|||||||
@ -69,10 +69,11 @@ services:
|
|||||||
build:
|
build:
|
||||||
context: ./frontend
|
context: ./frontend
|
||||||
dockerfile: Dockerfile
|
dockerfile: Dockerfile
|
||||||
|
args:
|
||||||
|
- REACT_APP_MACHINES_API_URL=http://localhost:10000
|
||||||
|
- REACT_APP_PRODUCTS_API_URL=http://localhost:10000
|
||||||
networks:
|
networks:
|
||||||
- frontend-net
|
- frontend-net
|
||||||
environment:
|
|
||||||
- REACT_APP_BACKEND_API_URL="http://localhost:10000"
|
|
||||||
ports:
|
ports:
|
||||||
- "8080:80"
|
- "8080:80"
|
||||||
depends_on:
|
depends_on:
|
||||||
|
|||||||
@ -3,6 +3,12 @@ FROM node:21 as node-builder
|
|||||||
|
|
||||||
WORKDIR /node-builder
|
WORKDIR /node-builder
|
||||||
|
|
||||||
|
ARG REACT_APP_MACHINES_API_URL
|
||||||
|
ARG REACT_APP_PRODUCTS_API_URL
|
||||||
|
|
||||||
|
ENV REACT_APP_MACHINES_API_URL $REACT_APP_MACHINES_API_URL
|
||||||
|
ENV REACT_APP_PRODUCTS_API_URL $REACT_APP_PRODUCTS_API_URL
|
||||||
|
|
||||||
COPY ./package.json .
|
COPY ./package.json .
|
||||||
COPY ./package-lock.json .
|
COPY ./package-lock.json .
|
||||||
COPY ./public ./public
|
COPY ./public ./public
|
||||||
|
|||||||
Reference in New Issue
Block a user