Skip to content

A boilerplate Docker project for development with a MySQL database, a Node.js backend using Express and Sequelize, and a React front-end.

License

Notifications You must be signed in to change notification settings

longguodev/docker-node-react-mysql-boilerplate

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Docker MySQL Node Sequelize React boilerplate project

This is a boilerplate Docker project that:

  1. Starts a MySQL server container based on the official image,
  2. Starts a Node.js 10.8.0 app that waits for the database to become responsive, and run all migrations and seeds if necessary,
  3. Starts a React app (also based on Node.js 10.8.0).

You only need to have Docker installed in your computer, nothing else. The docker-compose.yml file creates a bind mount directoty that allows you to test anything live, just change the code for the server or client and it will immediately become available.

The data for the MySQL will persist between launches.

To bring the project up first install Docker, then run:

docker-compose up

The docker-compose.yml file routes port 80 on your host to the React app running on 3000 on the Docker environment, so once the system is up just go to http://localhost.

To bring it down:

docker-compose down

If you change your Dockerfile and must rebuild the Node.js or React images, run:

docker-compose up --build

About

A boilerplate Docker project for development with a MySQL database, a Node.js backend using Express and Sequelize, and a React front-end.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • JavaScript 71.8%
  • HTML 12.0%
  • Shell 10.4%
  • Dockerfile 5.3%
  • CSS 0.5%