Skip to content

nickasd/nodejs-nginx-mariadb-stack

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 

Repository files navigation

nodejs-nginx-mariadb-stack

Install

  1. Install Docker.
  2. Run the commands
    cd ubuntu
    docker-compose build
    

Setup

In your project, create a docker-compose.yml file like this:

version: '3'
services:
  my_fancy_service:
    image: nodejs-nginx-mariadb-stack
    container_name: my_fancy_container
    ports:
      - "80:80"
      - "3306:3306"
      - "9229:9229"
    volumes:
      - ".:/server/lib"
      - "~/Docker-data/creative_word_clouds/mysql:/var/lib/mysql"

(Port 80 is used by the NodeJS server, port 3306 by MariaDB and port 9229 for debugging in VSCode.)

You can then create a container based on this image by running docker-compose up inside your project.

The container will not automatically install the node modules found in your project's package.json. If you haven't already done so from the host machine, you can:

  1. Start the container.
  2. Attach to it from VSCode by right-clicking the container in the sidebar and selecting "Attach Shell".
  3. Run the command
    npm install
    

Please note: some packages require that they are installed from the target machine directly because they are also compiled automatically, so we recommend following the steps above instead of simply running npm install from the host machine.

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published