Project Solution: Running the App
View the project running in development and production mode.
We'll cover the following
Launch in development mode
Launch the quiz in development mode with auto-building, source maps, and application restarts using the docker-compose.yml
configuration in the ./usercode
project root:
cd quiz
docker-compose up
The application is accessible via NGINX at http://{nginx_container_IP}:80
.
Additionally, you can access:
- The Node.js application directly at port
http://{nodejs_container_IP}:8000
. - The Node.js debugger at port
{nodejs_container_IP}:9229
.
You can find the container’s IP using:
docker inspect -f '{{range.NetworkSettings.Networks}}{{.IPAddress}}{{end}}' nginx
docker inspect -f '{{range.NetworkSettings.Networks}}{{.IPAddress}}{{end}}' nodejs
📌 The
quiz
database can be accessed using aby connecting to MongoDB client mongodbClient http://{mongodb_container_IP}:27017/
with the user IDquizuser
and passwordquizpass
.
Click on the “Run” button and the Chrome browser will be opened. You can open output for any of the containers by following the steps mentioned above.
Get hands-on with 1400+ tech skills courses.