Sign inSign up

omarbarakota/grad_project

By omarbarakota

•Updated 3 months ago

A Python web application that controls Autonomous mobile robots in warehouses

Image
0

309

omarbarakota/grad_project repository overview

⁠AMR Control & Monitoring Web Application (Docker Edition)

⁠Table Of Contents

1- Installation⁠

2- How Does It Work⁠

3- Additional Notes⁠

4- Small Demo⁠


⁠1- Installation

⁠1-1- Docker Installation

Install Docker on your host machine:

sudo apt-get update
sudo apt install docker.io docker-compose

To run Docker without sudo:

sudo groupadd docker
sudo usermod -aG docker $(whoami)
newgrp docker
docker run hello-world
⁠1-2- Mosquitto Installation

The app requires a local Mosquitto MQTT broker running on the host:

sudo apt install mosquitto mosquitto-clients
sudo systemctl enable mosquitto
sudo systemctl start mosquitto

⁠Step 2: Configure Mosquitto for Anonymous Access on Port 1883

Edit (or create) the Mosquitto configuration file:

sudo nano /etc/mosquitto/conf.d/anonymous.conf

add this into .conf

listener 1883
allow_anonymous true
⁠1-3- Pulling the App Image

Pull the latest image from Docker Hub:

docker pull omarbarakota/grad_project:latest

⁠2- How Does it Work?

⁠2-1- Running the Container

Run the container and connect it to the host network so it can access Mosquitto:

docker run -d --network host --name omarbarakota/grad_project omarbarakota/grad_project:latest
  • The app will be available at:
    http://<your-host-ip>:8000
⁠2-2- Connecting to Mosquitto
  • The app expects Mosquitto to be running on the host at port 1883.
  • If you use bridge networking, set the MQTT broker address to your host's IP.
⁠2-3- Opening a Shell in the Container

To open a shell in the running container:

docker exec -it omarbarakota/grad_project /bin/bash
⁠2-4- Committing Changes

If you make changes inside the container and want to save them:

docker commit omarbarakota/grad_project omarbarakota/grad_project:customtagname



⁠3- Additional Notes

  • Default Admin Login:
    Username: admin
    Password: 123
  • MQTT Broker:
    The app will not function fully unless Mosquitto is running on the host.
  • Firewall:
    Ensure ports 8000 (web) and 1883 (MQTT) are open.

⁠4- Small Demo

  1. Start Mosquitto on the host:

    sudo systemctl start mosquitto
    
  2. Run the app container:

    docker run -p 8000:8000 -e MQTT_BROKER=http://<your-broker-or-host-ip>: omarbarakota/grad_project:latest
    
  3. Access the web interface:
    Open http://<your-host-ip>:8000 in your browser.

  4. Login and control your robot!


⁠Troubleshooting

  • If the app cannot connect to MQTT, ensure Mosquitto is running and accessible from the container.
  • For advanced configuration, set environment variables or mount configuration files as needed.

Tag summary

Content type

Image

Digest

sha256:0301ba28a…

Size

66.2 MB

Last updated

3 months ago

docker pull omarbarakota/grad_project:v0.1.1