Merge pull request #316 from OktopUSP/dev

Fix frontend logo images + Obuspa device Version 8 | close #315
This commit is contained in:
Leandro Antônio Farias Machado 2024-07-16 10:21:21 -03:00 committed by GitHub
commit eb4c0d6935
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
9 changed files with 27 additions and 7 deletions

View File

@ -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

View File

@ -1,2 +1,2 @@
DIRECTORY_PATH="."
DIRECTORY_PATH="/app"
SERVER_PORT=":8004"

View File

@ -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;

View File

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

2
frontend/.gitignore vendored
View File

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

View File

@ -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

View File

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

View File

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

View File

@ -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",