From 8d67c61e93a8d05532950674604c2a9e4391076e Mon Sep 17 00:00:00 2001 From: leandrofars Date: Thu, 11 Jul 2024 13:00:25 -0300 Subject: [PATCH 1/3] 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) => { >
-
From 2681e7c5a3ebe4fec771220ac280a43bbe870e7f Mon Sep 17 00:00:00 2001 From: leandrofars Date: Fri, 12 Jul 2024 17:49:20 -0300 Subject: [PATCH 2/3] fix(frontend): custom-frontend + file-server --- deploy/compose/.env.file-server | 2 +- frontend/src/theme/create-palette.js | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/deploy/compose/.env.file-server b/deploy/compose/.env.file-server index 10e120d..badb9d2 100644 --- a/deploy/compose/.env.file-server +++ b/deploy/compose/.env.file-server @@ -1,2 +1,2 @@ -DIRECTORY_PATH="." +DIRECTORY_PATH="/app" SERVER_PORT=":8004" \ No newline at end of file diff --git a/frontend/src/theme/create-palette.js b/frontend/src/theme/create-palette.js index 7768322..104de92 100644 --- a/frontend/src/theme/create-palette.js +++ b/frontend/src/theme/create-palette.js @@ -4,7 +4,7 @@ import { error, indigo, info, neutral, success, warning, graphics } from './colo const getColorScheme = async () => { - let result = await fetch('http://localhost/custom-frontend/colors').catch((error) => { + let result = await fetch('/custom-frontend/colors').catch((error) => { console.log('Error fetching colors'); sessionStorage.setItem('colors', JSON.stringify({ "buttons": "#306d6f", From 51002480e32fca0533cc4d9e185409376d4b8b61 Mon Sep 17 00:00:00 2001 From: leandrofars Date: Tue, 16 Jul 2024 09:21:51 -0300 Subject: [PATCH 3/3] feat(agent): update obuspa to version 8.0.5 --- agent/Dockerfile | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/agent/Dockerfile b/agent/Dockerfile index 2a09979..5a70b41 100644 --- a/agent/Dockerfile +++ b/agent/Dockerfile @@ -27,11 +27,22 @@ RUN apt-get update && apt-get -y install \ automake \ libtool \ libmosquitto-dev \ - libwebsockets-dev \ pkg-config \ make \ + git \ + cmake \ + g++ \ && apt-get clean +RUN git clone https://github.com/warmcat/libwebsockets.git /tmp/libwebsockets && \ + cd /tmp/libwebsockets && \ + mkdir build && \ + cd build && \ + cmake .. && \ + make && \ + make install && \ + ldconfig + FROM build-env AS runner ENV MAKE_JOBS=8