This is a generated README by the BeCode CLI tool.
Follow the procedure on this page
Follow the procedure on this page
To use docker on Windows Home, you need to use the Docker Toolbox, which use VirtualBox to run docker on your machine.
The Docker Toolbox and the VirtualBox env will change two important things when you use docker :
- The host to access the containers isn't
localhost
, but the IP192.168.99.100
(by default) - Due to the nature of VirtualBox, the volumes binding between your local system and the containers are kinda limited. Please ensure that your working folder is inside the
C:/Users
path.
- Follow the procedure on this page
- Run the following command to fix a possible right issue :
sudo usermod -a -G docker $USER
- Follow the procedure on the page
- Restart your computer
To test your installation, run the command docker run hello-world
.
When starting your env for the first time, run the following command in yhour repo:
docker-compose build
NOTE: thus you don't need to run this command each time, it may be useful to rebuild your services when you change the configuration of your services.
Then, simply run the following command to get started:
docker-compose up
The details for all your services is detailed bellow.
Node.js is a software platform for scalable server-side and networking applications. Node.js applications are written in JavaScript and can be run within the Node.js runtime on Mac OS X, Windows, and Linux without changes.
Node.js applications are designed to maximize throughput and efficiency, using non-blocking I/O and asynchronous events. Node.js applications run single-threaded, although Node.js uses multiple threads for file and network events. Node.js is commonly used for real-time applications due to its asynchronous nature.
Node.js internally uses the Google V8 JavaScript engine to execute code; a large percentage of the basic modules are written in JavaScript. Node.js contains a built-in, asynchronous I/O library for file, socket, and HTTP communication. The HTTP and socket support allows Node.js to act as a web server without additional software such as Apache.
- Website: nodejs.org
- Documentation: nodejs.org/en/docs/
- Image used: becodeorg/node (derived from library/node)
Place your JS files in ./bin
folder, access it your browser at address localhost.
The container use nodemon to watch and reload your app on changes.
You can change the nodemon
command within your docker-compose.yml file according your needs.
IMPORTANT: your entry point must be defined in your package.json scripts.start
property, and your app's server must listen the 12345
port.
NOTE: the container expose the debugger on port 9229
to use with node inspector
MongoDB is a free and open-source cross-platform document-oriented database program. Classified as a NoSQL database program, MongoDB uses (JSON)[https://en.wikipedia.org/wiki/JSON]-like documents with schemata. MongoDB is developed by MongoDB Inc., and is published under a combination of the Server Side Public License and the Apache License.
- Website: mongodb.com
- Documentation: docs.mongodb.com
- Image used: library/mongo
IMPORTANT: the first startup of this container is long : the db server needs to be initialized.
NOTE: the container don't create a database at startup - create it within your code (or with MongoExpress)
You can access the database from another container with the following informations:
- host:
mongo
- port:
27017
- user:
dev
- pass:
dev
You can access the database from your host with the following informations:
- host:
localhost
- port:
27017
- user:
dev
- pass:
dev