Docker Tutorial | Nodejs + Express + Mongodb + React + Redis + Nginx| Nodejs + Express + Mongodb + React + Redis + Nginx

Overview

Docker Tutorial | Nodejs + Express + Mongodb + React + Redis + Nginx

How to use Docker to build and develop Nodejs, Express, Mongodb, React, and Redis applications.
How to use Docker with Nginx and Gitlab to automatically deploy to DigitalOcean.

Author: Dev A.T Viet Nam

Youtube: https://youtu.be/Cl0lXkzMuuo

Getting started:

cd api
docker build -t devatvietnam/rest-api:v1 .
docker run -it --rm --name rest-api -p 5000:5000 devatvietnam/rest-api:v1

πŸ”₯ Donate

πŸ‘» πŸ‘» VietNam:

  • πŸ‘‰ Vietcombank: 0061001044348 (LE TUAN ANH)
  • πŸ‘‰ Momo : 0374481936

Commonly used commands in docker:

  1. Build a image.
    - docker build -t "image-name" .
    - docker build -f "Dockerfile.dev" -t "image-name" .

  2. Run a container.
    - docker run -it --rm --name "container-name" -p 5000:5000 "image-name"
    - docker run -it -d --rm --name "container-name" -p 5000:5000 "image-name"
    - with -d: detach -> run a container in the background.

  3. Stop a container.
    - docker stop "container-name"

  4. Stop all running containers.
    - docker stop $(docker ps -a -q)

  5. Show all images.
    - docker images

  6. Delete a image.
    - docker rmi "image-id|image-name"

  7. Delete all images.
    - docker rmi $(docker images -q)

  8. Show all running containers.
    - docker ps

  9. Show all containers.
    - docker ps -a

  10. Delete a stopped container.
    - docker rm "container-name"

  11. Delete all stopped containers.
    - docker rm $(docker ps -a -q)

  12. Kill all running containers.
    - docker kill $(docker ps -q)

Commonly used commands in docker-compose:

  1. Build and rebuild a image.
    - docker-compose up --build
    - docker-compose -f "docker-compose.dev.yml" up --build

  2. Run and start containers.
    - docker-compose up
    - docker-compose -f "docker-compose.dev.yml" up

  3. Stop and clear containers.
    - docker-compose down
    - docker-compose -f "docker-compose.dev.yml" down

  4. Stop and clear containers, volumes.
    - docker-compose down -v
    - docker-compose -f "docker-compose.dev.yml" down -v

You might also like...
Example Of Fine-Tuning BERT For Named-Entity Recognition Task And Preparing For Cloud Deployment Using Flask, React, And Docker
Example Of Fine-Tuning BERT For Named-Entity Recognition Task And Preparing For Cloud Deployment Using Flask, React, And Docker

Example Of Fine-Tuning BERT For Named-Entity Recognition Task And Preparing For Cloud Deployment Using Flask, React, And Docker This repository contai

Notes taking Project uses Python (Django, REST API) + React (SPA Frontend) + Docker (Compose).
Notes taking Project uses Python (Django, REST API) + React (SPA Frontend) + Docker (Compose).

Notes taking website. Try it! / But how to run? Description This is monorepository with notes website, with API and Frontend servers. Website provides

Kanmail - An email client that functions like a kanban board, for Mac/Windows/Docker
Kanmail - An email client that functions like a kanban board, for Mac/Windows/Docker

Kanmail - An email client that functions like a kanban board, for Mac/Windows/Docker

Visual Docker Container Management on Mac & Windows
Visual Docker Container Management on Mac & Windows

⚠️ Deprecation Notice: This project and repository is now deprecated and is no longer under active development, see the related roadmap issue. Please

A lightweight open source alternative to linktree, complete with Docker container that hosts your web server and code.  Written in ReactJS SSR.
A lightweight open source alternative to linktree, complete with Docker container that hosts your web server and code. Written in ReactJS SSR.

πŸ”— LittleLink-Server This project is based on the great work from littlelink It takes the same simple approach to a link page and hosts it within a No

Visualize and manage your Docker networks.
Visualize and manage your Docker networks.

Follow us on DockerNet An easy-to-use, locally-hosted web app for developers and engineers to visualize and manage their Docker Networks in real-time.

An example configuration of a fullstack Node app with PostgreSQL using Docker Compose
An example configuration of a fullstack Node app with PostgreSQL using Docker Compose

Usage To use this project make sure you have Docker installed then run the follo

HOUDINI - a curated list of Network Security related Docker Images for Network Intrusion purposes
HOUDINI - a curated list of Network Security related Docker Images for Network Intrusion purposes

🐳 HOUDINI: Hundreds of Offensive and Useful Docker Images for Network Intrusion HOUDINI is a curated list of Network Security related Docker Images f

Microservice-Based Web Application deployed on AWS with Terraform, Ansible and Docker
Microservice-Based Web Application deployed on AWS with Terraform, Ansible and Docker

β˜οΈπŸ§πŸ‘ΎπŸ‹πŸ˜ Microservice-Based Web Application aims to deploy web-page written Node.js and React.js on AWS Cloud Infrastructure using Ansible and Terraform.

Owner
null
Full React with Nestjs/Nodejs Web Application deployed on Hostinger with docker and docker-compose

Full Web App React Nodejs w/ GraphQL Tailwind and Docker From Zero To Deployment | Master MERN STACK Full Video Course on CoderOne channel https://you

Islem Maboud 315 Jan 9, 2023
Online Marketplace Built with MERN stack (MongoDB, Express, React and Node)Online Marketplace Built with MERN stack (MongoDB, Express, React and Node)

?? Shopping App ?? Online Marketplace Built with MERN stack (MongoDB, Express, React and Node). ⚑️ ⚑️ ⚑️ Kiwi Shop ⚑️ ⚑️ ⚑️ ?? Table of contents Main

Tomiwa Adeyemi 10 Dec 23, 2022
react-express front & back end code challenge deployed on docker

Installation for Working Environment : Docker Install docker in Windows Install docker in Mac(Apple) Here's how you can install make Install make in W

Kyle Wilson 3 Mar 29, 2022
Backend for probook social media app using Nodejs, mongodb, express, jwt etc. Frontend is React, redux, material ui.

Probook - A social media app Probook App | A Social Media App An social media platform built using ReactJS, Redux Toolkit,Material UI, Node, Express,

Wasif Baliyan 22 Sep 30, 2022
E-commerce Web App for audio products. A full-stack project, using Nodejs and Express in the backend, MongoDB as database, React, and Redux on the front-end.

E-commerce Web App for audio products. A full-stack project, using Nodejs and Express in the backend, MongoDB as database, React, and Redux on the front-end.

Jose Furtado 11 Jan 2, 2023
MERN BLOG - Fullstack open source blogging application made with MongoDB, Express, React & Nodejs (MERN)

MERN BLOG Fullstack open source blogging application made with MongoDB, Express, React & Nodejs (MERN) Configuration and Setup Key Features Technologi

Muhammet YΔ±ldΔ±z 25 Dec 21, 2022
A lightweight message board made with MongoDB, Express, React, and NodeJS

?? Mini message board A lightweight message board made with MongoDB, Express, React, and NodeJS. ?? Libraries and tools used Frontend React: Frontend

alesbe 3 Jan 7, 2023
A social-network project with MERN (MongoDb, Express, ReactJs, NodeJs) + tailwindCss

Introduction This is a social-network project with MERN (MongoDb, Express, ReactJs, NodeJs) + tailwindCss Page (Not logged) Home. Login. Register. For

Frost 33 Dec 1, 2022
Zomato clone with Reactjs, MongoDB, Express , Nodejs, HTML, CSS, Bootstrap, firebase

Zomato is an Indian multinational restaurant aggregator and food delivery company founded by Deepinder Goyal and Pankaj Chaddah in 2008. Zomato provides information, menus and user-reviews of restaurants as well as food delivery options from partner restaurants in select cities. As of 2019, the service is available in 24 countries and in more than 10,000 cities.

pooja yadav 11 Dec 3, 2022
⚑️ realtime scalable server performance monitor application built using react, node, redis and socket.io with clusters module.

PERFMonitor - Performance Monitoring System Introduction PERFMonitor is a web application that shows you performance and problems of one or more serve

Dulaj Kavinda 13 Jul 31, 2022