diff --git a/deploy/compose/.env.file-server b/deploy/compose/.env.file-server new file mode 100644 index 0000000..10e120d --- /dev/null +++ b/deploy/compose/.env.file-server @@ -0,0 +1,2 @@ +DIRECTORY_PATH="." +SERVER_PORT=":8004" \ No newline at end of file diff --git a/deploy/compose/.gitignore b/deploy/compose/.gitignore index af5be97..93a4138 100644 --- a/deploy/compose/.gitignore +++ b/deploy/compose/.gitignore @@ -3,4 +3,8 @@ portainer_data/* mongo_data/* !mongo_data/.gitkeep nats_data/* -!nats_data/.gitkeep \ No newline at end of file +!nats_data/.gitkeep +firmwares/* +!firmwares/.gitkeep +images/* +!images/logo.png \ No newline at end of file diff --git a/deploy/compose/docker-compose.yaml b/deploy/compose/docker-compose.yaml index 5fdbddd..6695559 100644 --- a/deploy/compose/docker-compose.yaml +++ b/deploy/compose/docker-compose.yaml @@ -191,15 +191,31 @@ 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: diff --git a/deploy/compose/firmwares/.gitkeep b/deploy/compose/firmwares/.gitkeep new file mode 100644 index 0000000..e69de29 diff --git a/frontend/public/assets/oktopus.png b/deploy/compose/images/logo.png similarity index 100% rename from frontend/public/assets/oktopus.png rename to deploy/compose/images/logo.png diff --git a/deploy/compose/nginx.conf b/deploy/compose/nginx.conf index 1bba7d8..4a762b8 100644 --- a/deploy/compose/nginx.conf +++ b/deploy/compose/nginx.conf @@ -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 { diff --git a/frontend/src/layouts/dashboard/side-nav.js b/frontend/src/layouts/dashboard/side-nav.js index d67d4d5..ce2e646 100644 --- a/frontend/src/layouts/dashboard/side-nav.js +++ b/frontend/src/layouts/dashboard/side-nav.js @@ -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' }} > - +