This environment was tested in these operating systems:
- Linux:
- Ubuntu 16.04
- Mac:
- MacOS Sierra 10.12.6
- Windows:
- Windows 7 Home Basic
- Windows 10 Professional
In the host machine is necesary has this componets installed with this versions recommended:
Component | Version recommended | Required |
---|---|---|
Docker | 17.12.0+ | X |
Docker compose | 1.8.0+ | X |
In this part i show how to use the environment, how execute the commands NPM for Node Application and React Application.
-
Commands:
- Build and Start all containers:
You can start all containers in this environment, executing a command in the terminal:
After enter in the root directory project, you must execute the command docker-compose up --build. This command start all containers stopped.
We notice that after execute the command display a output indicating the starting process of the containers.
user@localhost:react-node-docker-app $ docker-compose up -build Successfully built bcd082dbd140 Successfully tagged appapi:latest Creating react-node-docker-app_nodeapi_1 Creating react-node-docker-app_reactapi_1 Attaching to react-node-docker-app_reactapi_1, react-node-docker-app_nodeapi_1
- Build and Start all containers:
You can start all containers in this environment, executing a command in the terminal:
After enter in the root directory project, you must execute the command docker-compose up --build. This command start all containers stopped.
-
Enter and use the application:
-
View the Node Home: Enter in the browser bar address the server_name with its port corresponding.
http://localhost:3000
-
View the React Home: Enter in the browser bar address the server_name with its port corresponding.
http://localhost:8080
-