fix(frotend): images location + maps api key build

This commit is contained in:
leandrofars 2024-07-11 13:00:25 -03:00
parent b057076ed4
commit 8d67c61e93
6 changed files with 13 additions and 4 deletions

View File

@ -34,6 +34,12 @@ server {
proxy_connect_timeout 60; proxy_connect_timeout 60;
proxy_redirect off; 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 { location /socket.io {
proxy_pass http://host.docker.internal:5000; proxy_pass http://host.docker.internal:5000;
proxy_read_timeout 60; proxy_read_timeout 60;

View File

@ -2,7 +2,6 @@
NEXT_PUBLIC_WS_ENDPOINT="http://localhost:5000/" NEXT_PUBLIC_WS_ENDPOINT="http://localhost:5000/"
NEXT_PUBLIC_ENTERPRISE_VERSION="false" NEXT_PUBLIC_ENTERPRISE_VERSION="false"
NEXT_PUBLIC_GOOGLE_MAPS_KEY=""
# ---------------------------------------------------------------------------- # # ---------------------------------------------------------------------------- #
# -------------------------- Production Environment -------------------------- # # -------------------------- Production Environment -------------------------- #

2
frontend/.gitignore vendored
View File

@ -24,3 +24,5 @@ out
npm-debug.log* npm-debug.log*
yarn-debug.log* yarn-debug.log*
yarn-error.log* yarn-error.log*
build/image.sh

View File

@ -2,12 +2,14 @@ FROM node:18.18.0-alpine as builder
WORKDIR /app WORKDIR /app
ARG GOOGLE_MAPS_API_KEY
COPY ../ ./ COPY ../ ./
RUN rm .env && rm .env.local || true RUN rm .env && rm .env.local || true
RUN npm install 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 FROM node:18.18.0-alpine as runner

View File

@ -76,7 +76,7 @@ export const Layout = (props) => {
<Link href="http://localhost/companylink" target="_blank"> <Link href="http://localhost/companylink" target="_blank">
<img <img
alt="" alt=""
src="http://localhost:8004/images/logo.png" src="/images/logo.png"
/> />
</Link> </Link>
</Box> </Box>

View File

@ -82,7 +82,7 @@ export const SideNav = (props) => {
> >
<Link href="http://localhost/companylink" target="_blank"> <Link href="http://localhost/companylink" target="_blank">
<div style={{display:'flex',justifyContent:'center'}}> <div style={{display:'flex',justifyContent:'center'}}>
<img src="http://localhost:8004/images/logo.png" <img src="/images/logo.png"
width={'60%'} width={'60%'}
/> />
</div> </div>