Environment variable for frontend build

This commit is contained in:
2023-02-20 14:47:40 +01:00
parent fe7c6e10de
commit 03a7321893
2 changed files with 3 additions and 2 deletions

View File

@@ -25,5 +25,3 @@ services:
dockerfile: Dockerfile_prod dockerfile: Dockerfile_prod
ports: ports:
- "3003:3000" - "3003:3000"
environment:
REACT_APP_API_URL: "http://192.168.1.171:8000"

View File

@@ -21,6 +21,9 @@ RUN npm install
# Copies everything over to Docker environment # Copies everything over to Docker environment
COPY . . COPY . .
ENV REACT_APP_API_URL="http://192.168.1.171:8000"
# Build for production. # Build for production.
RUN npm run build --production RUN npm run build --production