Skip to content

A multi-container, Compose configured, web application.

Notifications You must be signed in to change notification settings

dmertins/hello-docker-compose

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

8 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

hello-docker-compose

A multi-container, Compose configured, web application.

Contents

  1. Application overview
  2. Requirements
  3. Running the application stack
  4. Running the application in development mode

Application overview

The application is composed of the following parts:

  • Express server running on Node.js;
  • MySQL relational database with a persistent volume;
  • Nginx serving the application as a reverse proxy;
(External user)
       |
      8080
       |
 +-----------+
 |   nginx   |
 |  service  |
 +-----------+
       |
 +-----------+
 |  node.js  |
 |  service  |
 +-----------+
       |
 +-----------+       ______________
 |   mysql   |  r+w (  persistent  )
 |  service  |=======\   volume   /
 +-----------+        \__________/

All application services are configured in the Compose file.

Requirements

Running the application stack

To run the application services:

$ docker compose up --build

To check the application containers status:

$ docker compose ps

The web application listens on port 8080. To access the application, open a web browser and go to the following address:

http://localhost:8080

To stop the application services:

$ docker compose down

Running the application in development mode

In development mode, the application source code is bind mounted into the running container, and nodemon automatically restarts the application when file changes are detected. These configuration are defined in the Compose development file.

To run the application in development mode:

$ docker compose -f compose.yaml -f compose.dev.yaml up --build

About

A multi-container, Compose configured, web application.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published