Code Monkey home page Code Monkey logo

mobius_docker's Introduction

Mobius_Docker Installation

1. Download Mobius_Docker from KETI's git repository

sudo git clone https://github.com/IoTKETI/Mobius_Docker.git
cd Mobius_Docker

2. Execute "install.sh"

sudo ./instatll.sh

3. Execute "run.sh"

sudo ./run.sh

4. Test using cURL

sudo ./test.sh

You can follows below commands for each objective

Stop mobius docker containers 
"sudo ./stop.sh"

Remove mobius docker containers
"sudo ./remove.sh"

Check status of mobius docker containers
"sudo ./status.sh"

Show logs of mobius docker containers
"sudo ./logs.sh"

Snapshot of normal running Mobius docker

In the snapshot, left console shows response of "Retrieve CES Resource" and right console describes request of "Retreive CSE Resoruce" respectively.

정상동작 화면 정상동작 화면

Docker-compose configuration details

DB

image: mysql:latest    # Import the mysql docker image stored in the Docker-Hub.
environment:        # This is the mysql environment variable setting.
  MYSQL_ALLOW_EMPTY_PASSWORD: "yes"
  MYSQL_ROOT_PASSWORD: "dksdlfduq2"
  MYSQL_DATABASE: "mobiusdb"
ports:    # Port matching of HOST Port and Docker is required.  "HOST:Docker-container" 
  - "3306:3306"
network_mode: "host"  # It operates in the same network environment as the host for easy use.
volumes:              # Get the required libraries from the Host. The mobiusdb.sql file is prepared in this path.
  - ./Mobius/sql:/docker-entrypoint-initdb.d
healthcheck:          # It is a function of Docker-compose to check whether the software is working or not.
        test: ["CMD", "mysqladmin" , "--password=dksdlfduq2", "ping"]
        interval: 20s
        timeout: 20s
        retries: 10

Mobius

image: "node:14.5.2"
working_dir: /home/node/app   # Sets the virtual image directory of the Nodejs-based Mobius.
environment:
  - NODE_ENV=production
volumes:                   # Import mobius source code from the host into the virtual image directory.
  - ./Mobius:/home/node/app
network_mode: "host"
expose:
  - "8081"
command: "node mobius"  # When the Docker preference is complete, Mobius runs up.
depends_on:             # After Mysql is running, Mobius will work. If this is not taken into consideration, it will not execute normally due to delay with DB.
        db:
            condition: service_healthy

MQTT

image: eclipse-mosquitto:latest  # Import the mosquitto (MQTT Tool) image stored in the Docker-Hub.
ports:
  - 1883:1883
network_mode: "host"
volumes:
  - ./etc/mosquitto:/etc/mosquitto:ro
  - ./var/log/mosquitto:/var/log/mosquitto:rw
depends_on:		    # Mosquitto will work after mysql is running. If this is not taken into consideration, the delay with Mobius will not work properly.
        db:
            condition: service_healthy

Authors

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.