Merge pull request #316 from OktopUSP/dev
Fix frontend logo images + Obuspa device Version 8 | close #315
This commit is contained in:
commit
eb4c0d6935
|
|
@ -27,11 +27,22 @@ RUN apt-get update && apt-get -y install \
|
||||||
automake \
|
automake \
|
||||||
libtool \
|
libtool \
|
||||||
libmosquitto-dev \
|
libmosquitto-dev \
|
||||||
libwebsockets-dev \
|
|
||||||
pkg-config \
|
pkg-config \
|
||||||
make \
|
make \
|
||||||
|
git \
|
||||||
|
cmake \
|
||||||
|
g++ \
|
||||||
&& apt-get clean
|
&& 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
|
FROM build-env AS runner
|
||||||
|
|
||||||
ENV MAKE_JOBS=8
|
ENV MAKE_JOBS=8
|
||||||
|
|
|
||||||
|
|
@ -1,2 +1,2 @@
|
||||||
DIRECTORY_PATH="."
|
DIRECTORY_PATH="/app"
|
||||||
SERVER_PORT=":8004"
|
SERVER_PORT=":8004"
|
||||||
|
|
@ -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;
|
||||||
|
|
|
||||||
|
|
@ -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
2
frontend/.gitignore
vendored
|
|
@ -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
|
||||||
|
|
|
||||||
|
|
@ -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
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -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>
|
||||||
|
|
|
||||||
|
|
@ -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>
|
||||||
|
|
|
||||||
|
|
@ -4,7 +4,7 @@ import { error, indigo, info, neutral, success, warning, graphics } from './colo
|
||||||
|
|
||||||
const getColorScheme = async () => {
|
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');
|
console.log('Error fetching colors');
|
||||||
sessionStorage.setItem('colors', JSON.stringify({
|
sessionStorage.setItem('colors', JSON.stringify({
|
||||||
"buttons": "#306d6f",
|
"buttons": "#306d6f",
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue
Block a user