Coder Social home page Coder Social logo

laisfrigerio / boilerplate-docker-node-mysql Goto Github PK

View Code? Open in Web Editor NEW
8.0 1.0 0.0 23 KB

A boilerplate docker project for development with a mysql database and a node.js backend using express ๐Ÿ’œ

License: MIT License

Shell 6.65% Dockerfile 9.60% JavaScript 83.76%
docker docker-compose dockerfile nodejs node node-js nodemon boilerplate boilerplate-application boilerplate-backend express expressjs express-js mysql mysql-database mysql2 api

boilerplate-docker-node-mysql's Introduction

ยฉ๏ธ docker + node + mysql boilerplate ๐Ÿ’œ

A boilerplate Docker project for development with a mysql database, a node.js backend using Express

๐Ÿ› ๏ธ Stack

  • nodejs: 14 + express
  • mysql: 8.0
  • docker

Docker version

We develop this boilerplate with the following docker version: 19.03.13

docker-compose version: 1.29.0

๐Ÿ“ Features

  • โ˜‘๏ธ nodejs 14 + express api
  • โ˜‘๏ธ mysql 8 database
  • โ˜‘๏ธ running this application with docker

๐Ÿ’Ž Run

Case if you have a mysql instance running, you must shutdown before run docker container:

  $ sudo service mysql stop

Then:

  $ cp .env.example .env
  $ npm run clean:cache
  $ npm run build
  $ npm run start:background

Stop container

  1. To stop running a container, first execute the following command to get container id:
  docker ps
  1. Copy the container ID and run the following command:
  docker stop <container id>

Access mysql database container

To access the database container, we must get the container id first. Run the following command:

  $ docker ps

This previous command list all active containers.

Copy mysql container id and type the following:

  $ docker exec -it <container id> bash

Then, to access database via line command:

  $ mysql -u <username> -p

๐Ÿ‘ฉ Author

@laisfrigerio

๐Ÿ“„ License

This project is licensed under the MIT License - see the LICENSE.md file for details

boilerplate-docker-node-mysql's People

Contributors

laisfrigerio avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.