Skip to content

A full stack e-commerce solution built with Nuxt.js, VueJS, Node-RED. The stack is fully containerized using Docker. Duplicati is used to backup docker volumes periodically and portainer is used to expose docker health matrices to make it moniterable.

WGLabz/smarty

Repository files navigation

Code Smells Quality Gate Status

Smarty: The Website to dig into smart home appliances!

Setup Duplicati and Portainer credentials after the servers are up.

Creds

Duplicati Passphrase: L2@Ki

Docker env variables

Rename or copy the **.env file to .env and add the credentials.

Add DB User on MongoDB(New Installation)

First access the shell of the container docker exec -it mongo bash and run the following commands,

> use smarty
> db.createUser(
  {
    user: "root",
    pwd: "********", 
    roles: [
       { role: "readWrite", db: "smarty" }
    ]
  }
)

Setting up NodeRED Authentication

We need to add the following code snippet to the Node-RED settings.js file. The passwords need to be hashed and can be generated using this site

Edit the settings.js file using the command sudo nano /opt/volumes/node-red/data/settings.js, add the following snippet and restart the docker container, docker restart node_red

    adminAuth: {
        type: "credentials",
        users: [
            {
                username: "admin",
                password: "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxx",
                permissions: "*"
            },
            {
                username: "app",
                password: "xxxxxxxxxxxxxxxxxxx",
                permissions: "read"
            }
        ]
    }

To make the http calls to the platform secured, add the following line to the settings.js file,

    httpNodeAuth: {
        user:"app",
        pass:"xxxxxxxxxxxxxxxxxxxxxxxx"
    },

For serving static assets like images, without going through the platform, add the following line to the file,

    httpStatic:"/assets/",

where you can upload all the static files to the /assets/ folder and can be accssed by using http(s)//<node_red_ip>:<port>/<aeet_path> endpoint.

Used Tools w/ Docker

  1. Node-RED [Secured with Basic Auth]
  2. Nginx to host the app.[Port 80 Open]
  3. Duplicati for Backups. [Secured Later with password]
  4. mongoDB for DB. [Secured not ceonnectible from outside]
  5. Portainer for Health details. [Secured with basic Auth]

About

A full stack e-commerce solution built with Nuxt.js, VueJS, Node-RED. The stack is fully containerized using Docker. Duplicati is used to backup docker volumes periodically and portainer is used to expose docker health matrices to make it moniterable.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published