Skip to content

Real Time Monitoring Accident and Casualty in Thailand Back-end in DevOps with Node.js & Express

Notifications You must be signed in to change notification settings

CEPP-KMITL/RTMA-full_stack

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Real Time Monitoring Accident and Casualty in Thailand (RTMC)

Data aggregation of news archive that allows user to search incidents through the new and see the correlation with the location on the map for reference.

Developer

Dependency Note

Adds the third-party package to the package's development dependencies. It won't be installed when someone runs npm install directly to install your package.

  npm install ${package name} --save-dev
  npm i -D ${package name}

Run Locally For Back-end Dev

Clone the project then go to the project directory (cd into RTMA-full_stack)

Start dev detach or with console (Use Windows PowerShell)

  make up-backend-d
  make up-backend

Stop dev

  make down

Run Locally For Front-end Dev

Clone the project then go to the project directory (cd into RTMA-full_stack)

Start dev detach or with console (Use Windows PowerShell)

  make up-frontend-d
  make up-frontend

Stop dev

  make down

Run Locally For Scraping Dev

Clone the project then go to the project directory (cd into RTMA-full_stack)

Start dev detach or with console (Use Windows PowerShell)

  make up-scraping-d
  make up-scraping

Stop dev

  make down

Run Locally For Filter Dev

Clone the project then go to the project directory (cd into RTMA-full_stack)

Start dev detach or with console (Use Windows PowerShell)

  make up-filter-d
  make up-filter

Stop dev

  make down

See Whole Container Logs

  make logs

Get Into Service CLI

node-app (Back-end)

  make into-node-app

mongo (Database)

  make into-mongo

vue-app (Front-end)

  make into-vue-app

Purging All Unused or Dangling Images, Containers, Volumes, and Networks

A single command that will clean up any resources — images, containers, volumes, and networks — that are dangling (not associated with a container)

  make prune

To additionally remove any stopped containers and all unused images (not just dangling images)

  make prune-all

Useful Docker Commands

  // create and start containers
  docker-compose up
  // start services with detached mode
  docker-compose -d up
  // start specific service
  docker-compose up <service-name>
  // list images
  docker-compose images
  // list containers
  docker-compose ps
  // start service
  docker-compose start
  // stop services
  docker-compose stop
  // display running containers
  docker-compose top
  // kill services
  docker-compose kill
  // remove stopped containers
  docker-compose rm
  // stop all contaners and remove images, volumes
  docker-compose down

Docker Documentation

Go to the project directory then build image command

  docker build -t rtma-api-image .

Run container command with read-only bind mount

  docker run -v ${pwd}:/app:ro -v /app/node_modules --env-file ./.env -p 8000:3000 -d --name rtma-api-app rtma-api-image

Run entire container

  docker-compose -f docker-compose.yml -f docker-compose.dev.yml up --build --force-recreate

Get in container

  docker exec -it ${container_name} bash

Get in mongo

  mongo -u "${username}" -p "${password}"

Show all mongo database

  show dbs

Select mongo database

  use ${database_name}

About

Real Time Monitoring Accident and Casualty in Thailand Back-end in DevOps with Node.js & Express

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published