From 8d67c61e93a8d05532950674604c2a9e4391076e Mon Sep 17 00:00:00 2001 From: leandrofars Date: Thu, 11 Jul 2024 13:00:25 -0300 Subject: [PATCH] fix(frotend): images location + maps api key build --- deploy/compose/nginx.conf | 6 ++++++ frontend/.env | 1 - frontend/.gitignore | 2 ++ frontend/build/Dockerfile.ee | 4 +++- frontend/src/layouts/auth/layout.js | 2 +- frontend/src/layouts/dashboard/side-nav.js | 2 +- 6 files changed, 13 insertions(+), 4 deletions(-) diff --git a/deploy/compose/nginx.conf b/deploy/compose/nginx.conf index 64e9648..b4fccac 100644 --- a/deploy/compose/nginx.conf +++ b/deploy/compose/nginx.conf @@ -34,6 +34,12 @@ server { proxy_connect_timeout 60; proxy_redirect off; } + location /images { + proxy_pass http://host.docker.internal:8004; + proxy_read_timeout 60; + proxy_connect_timeout 60; + proxy_redirect off; + } location /socket.io { proxy_pass http://host.docker.internal:5000; proxy_read_timeout 60; diff --git a/frontend/.env b/frontend/.env index 293b49b..a10f904 100644 --- a/frontend/.env +++ b/frontend/.env @@ -2,7 +2,6 @@ NEXT_PUBLIC_WS_ENDPOINT="http://localhost:5000/" NEXT_PUBLIC_ENTERPRISE_VERSION="false" -NEXT_PUBLIC_GOOGLE_MAPS_KEY="" # ---------------------------------------------------------------------------- # # -------------------------- Production Environment -------------------------- # diff --git a/frontend/.gitignore b/frontend/.gitignore index 656fd8a..5fa34f4 100644 --- a/frontend/.gitignore +++ b/frontend/.gitignore @@ -24,3 +24,5 @@ out npm-debug.log* yarn-debug.log* yarn-error.log* + +build/image.sh diff --git a/frontend/build/Dockerfile.ee b/frontend/build/Dockerfile.ee index 1c22a13..403ebd5 100644 --- a/frontend/build/Dockerfile.ee +++ b/frontend/build/Dockerfile.ee @@ -2,12 +2,14 @@ FROM node:18.18.0-alpine as builder WORKDIR /app +ARG GOOGLE_MAPS_API_KEY + COPY ../ ./ RUN rm .env && rm .env.local || true RUN npm install -RUN NEXT_PUBLIC_ENTERPRISE_VERSION="true" npm run build +RUN NEXT_PUBLIC_ENTERPRISE_VERSION="true" NEXT_PUBLIC_GOOGLE_MAPS_KEY=${GOOGLE_MAPS_API_KEY} npm run build FROM node:18.18.0-alpine as runner diff --git a/frontend/src/layouts/auth/layout.js b/frontend/src/layouts/auth/layout.js index b8d2872..6c2c034 100644 --- a/frontend/src/layouts/auth/layout.js +++ b/frontend/src/layouts/auth/layout.js @@ -76,7 +76,7 @@ export const Layout = (props) => { diff --git a/frontend/src/layouts/dashboard/side-nav.js b/frontend/src/layouts/dashboard/side-nav.js index d09aed5..6209eee 100644 --- a/frontend/src/layouts/dashboard/side-nav.js +++ b/frontend/src/layouts/dashboard/side-nav.js @@ -82,7 +82,7 @@ export const SideNav = (props) => { >
-