Sign inSign up

ladder99/sharc-ui

By ladder99

Updated over 1 year ago

Image for https://sharc.tech

Image
0

625

ladder99/sharc-ui repository overview

Sharc Tech Installation Instructions

To Run Locally (MQTT Broker already setup | Without compose)
  1. Ensure you have Docker installed
    1. If you do not, follow https://docs.docker.com/ installation instructions for your OS
  2. Open a terminal window
  3. Pull the Sharc-Tech image using docker pull ladder99/sharc-ui:latest
  4. Run the image inside of a container using docker run -d -p 80:80 ladder99/sharc-ui:latest
  5. Navigate to https://localhost/ in your browser
  6. If you already have a MQTT Broker set up you are good to go!
To Run Locally (MQTT Broker already setup | Without compose)
  1. Ensure you have Docker and Docker Compose installed
    1. If you do not, follow https://docs.docker.com/ installation instructions for your OS
  2. Create a file named docker-compose.yml
  3. Copy this configuration into the file:
version: "3.9"

services:

  sharc-ui:
    image: ladder99/sharc-ui:latest
    container_name: sharc_tech
    restart: unless-stopped
    logging:
      driver: "json-file"
      options:
        max-file: "5"
        max-size: "1m"
    ports:
      - "80:80/tcp"
  1. Go to directory that the file is located in
  2. Run docker compose up -d in the terminal
  3. Navigate to https://localhost/ in your browser
  4. If you already have a MQTT Broker set up you are good to go!
To Run Locally (MQTT Broker not setup | With docker-compose)
  1. Ensure you have Docker and Docker Compose installed
    1. If you do not, follow https://docs.docker.com/ installation instructions for your OS
  2. Create a file named docker-compose.yml
    1. Make sure to note down where this file is created.
  3. Copy this configuration into the file:
version: "3.9"

services:

  sharc-ui:
    image: ladder99/sharc-ui
    container_name: sharc_tech
    restart: unless-stopped
    logging:
      driver: "json-file"
      options:
        max-file: "5"
        max-size: "1m"
    environment:
      - REACT_APP_BROKER_IP=wss.sharc.tech
      - REACT_APP_BROKER_PORT=443
    ports:
      - "80:80/tcp"

  mosquitto:
    container_name: mosquitto
    image: eclipse-mosquitto
    restart: unless-stopped
    ports:
      - "1883:1883/tcp"
      - "9001:9001/tcp"
    volumes:
      - /etc/localtime:/etc/localtime:ro
      - /etc/timezone:/etc/timezone:ro
      - /home/your_username/volumes/mosquitto/config:/mosquitto/config:rw
      - /home/your_username/volumes/mosquitto/data:/mosquitto/data:rw
      - /home/your_username/volumes/mosquitto/log:/mosquitto/log:rw
    logging:
      driver: "json-file"
      options:
        max-size: "20m"
  1. Ensure that you replace your_username with the username of your computer
  2. Go to the directory of the file created in step 2
  3. Run docker compose up -d in the terminal
  4. Go to the newly created volume directory at /home/your_username/volumes/mosquitto/config
  5. Create a file named mosquitto.conf
  6. Copy this text into the file and save:
connection_messages true
log_dest stdout
log_dest stderr
log_timestamp true
log_type all
max_inflight_bytes 1000000
max_inflight_messages 1
max_queued_bytes 2000000
max_queued_messages 1000
message_size_limit 1500
persistence false
queue_qos0_messages false
retain_available true
per_listener_settings true
listener 1883 0.0.0.0
protocol mqtt
allow_anonymous true
max_connections 100
socket_domain ipv4
allow_zero_length_clientid false
listener 9001 0.0.0.0
protocol websockets
allow_anonymous true
max_connections 100
socket_domain ipv4
allow_zero_length_clientid false

This will ensure that your broker is set up to allow websocket connections on port 9001

  1. Navigate to https://localhost/ in your browser
  2. Congrats! You now have both Sharc-Tech and a MQTT Broker running locally

Tag summary

Content type

Image

Digest

sha256:309b9ca68

Size

70.6 MB

Last updated

over 1 year ago

docker pull ladder99/sharc-ui