feat: file-server host logo image + add config to docker compose

This commit is contained in:
leandrofars 2024-07-05 14:01:38 -03:00
parent d1a44765fe
commit 1da6678c09
7 changed files with 35 additions and 11 deletions

View File

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

View File

@ -4,3 +4,7 @@ mongo_data/*
!mongo_data/.gitkeep
nats_data/*
!nats_data/.gitkeep
firmwares/*
!firmwares/.gitkeep
images/*
!images/logo.png

View File

@ -191,16 +191,32 @@ services:
container_name: nginx
ports:
- 80:80
depends_on:
- frontend
- controller
- socketio
# depends_on:
# - frontend
# - controller
# - socketio
volumes:
- ./nginx.conf:/etc/nginx/conf.d/default.conf
extra_hosts:
- "host.docker.internal:host-gateway"
networks:
usp_network:
ipv4_address: 172.16.235.17
file-server:
image: oktopusp/file-server
container_name: file-server
ports:
- 8004:8004
volumes:
- ./firmwares:/app/firmwares
- ./images:/app/images
env_file:
- .env.file-server
networks:
usp_network:
ipv4_address: 172.16.235.18
networks:
usp_network:
driver: bridge

View File

View File

Before

Width:  |  Height:  |  Size: 19 KiB

After

Width:  |  Height:  |  Size: 19 KiB

View File

@ -11,19 +11,19 @@ server {
}
location / {
proxy_pass http://frontend:3000;
proxy_pass http://host.docker.internal:3000;
proxy_read_timeout 60;
proxy_connect_timeout 60;
proxy_redirect off;
}
location /api {
proxy_pass http://controller:8000;
proxy_pass http://host.docker.internal:8000;
proxy_read_timeout 60;
proxy_connect_timeout 60;
proxy_redirect off;
}
location /socket.io {
proxy_pass http://socketio:5000;
proxy_pass http://host.docker.internal:5000;
proxy_read_timeout 60;
proxy_connect_timeout 60;
proxy_redirect off;
@ -34,6 +34,9 @@ server {
proxy_set_header Host $host;
proxy_cache_bypass $http_upgrade;
}
location /companylink {
return 301 https://oktopus.app.br/controller;
}
error_page 500 502 503 504 /50x.html;
location = /50x.html {

View File

@ -34,7 +34,6 @@ export const SideNav = (props) => {
}
return false;
//TODO: test frontend with color of the landing page
}
const content = (
@ -80,9 +79,9 @@ export const SideNav = (props) => {
p: '12px'
}}
>
<Link href="https://oktopus.app.br" target="_blank">
<Link href="http://localhost/companylink" target="_blank">
<div style={{display:'flex',justifyContent:'center'}}>
<img src="/assets/oktopus.png"
<img src="http://localhost:8004/images/logo.png"
width={'60%'}
/>
</div>