From 94c2879cc06039f4020dda752a884660a5b8fc26 Mon Sep 17 00:00:00 2001 From: Niggl Date: Sat, 6 Jun 2020 22:23:54 +0200 Subject: [PATCH] Added env to dockerfile and docker-compose --- Dockerfile | 1 + docker-compose.yml | 4 +++- 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/Dockerfile b/Dockerfile index 5a0fa3e..863edab 100644 --- a/Dockerfile +++ b/Dockerfile @@ -14,5 +14,6 @@ RUN npm run build # Stage 2: Package up with the webserver FROM nginx:alpine AS final +ENV API_URL "https://localhost:5001" COPY --from=build /build/dist/frontend /usr/share/nginx/html CMD ["/bin/sh", "-c", "envsubst < /usr/share/nginx/html/assets/env.template.js > /usr/share/nginx/html/assets/env.js && exec nginx -g 'daemon off;'"] \ No newline at end of file diff --git a/docker-compose.yml b/docker-compose.yml index d542488..5da458c 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -8,4 +8,6 @@ services: networks: - default ports: - - "8080:80" \ No newline at end of file + - "8080:80" + environment: + API_URL: http://localhost:5001 \ No newline at end of file