Added env to dockerfile and docker-compose

This commit is contained in:
Nicolai Ort 2020-06-06 22:23:54 +02:00
parent ab32b3c94e
commit 94c2879cc0
2 changed files with 4 additions and 1 deletions

View File

@ -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;'"]

View File

@ -8,4 +8,6 @@ services:
networks:
- default
ports:
- "8080:80"
- "8080:80"
environment:
API_URL: http://localhost:5001