Skip to content

Instantly share code, notes, and snippets.

@romuloctba
Created March 18, 2019 00:52
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save romuloctba/7d10640502699d440532b8d1cd0037e2 to your computer and use it in GitHub Desktop.
Save romuloctba/7d10640502699d440532b8d1cd0037e2 to your computer and use it in GitHub Desktop.
Docker Environment for Express 4 with typescript + MongoDB
  1. Create a bridge network for the containers docker network create app01net

  2. Run MongoDB Docker Container docker run --name mongoserver --network app01net mongo:latest This will make mongodb://mongoserver available (not port needed)

  3. Run NodeJS environment mkdir application docker run --rm -it -w="/usr/src/app" -p 3000:3000 -v $PWD/application:/usr/src/app:z --network app01net node:latest bash

  4. Clone the express 4 typescript starter to the application folder (I had to update all packages so it works, otherwise got build errors)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment