{"id":22279615,"url":"https://github.com/vedant-mahajan/node-app-containerization","last_synced_at":"2026-04-10T21:06:24.157Z","repository":{"id":168935379,"uuid":"644702532","full_name":"Vedant-MAHAjan/Node-App-Containerization","owner":"Vedant-MAHAjan","description":"Containerize NodeJS app with MongoDB backend","archived":false,"fork":false,"pushed_at":"2023-05-24T08:02:48.000Z","size":5945,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-01-30T16:18:20.933Z","etag":null,"topics":["docker","docker-compose","nodejs"],"latest_commit_sha":null,"homepage":"","language":"HTML","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/Vedant-MAHAjan.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2023-05-24T04:44:57.000Z","updated_at":"2023-06-02T06:05:32.000Z","dependencies_parsed_at":"2023-05-31T15:45:43.356Z","dependency_job_id":null,"html_url":"https://github.com/Vedant-MAHAjan/Node-App-Containerization","commit_stats":null,"previous_names":["vedant-mahajan/node-containerization-"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Vedant-MAHAjan%2FNode-App-Containerization","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Vedant-MAHAjan%2FNode-App-Containerization/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Vedant-MAHAjan%2FNode-App-Containerization/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Vedant-MAHAjan%2FNode-App-Containerization/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Vedant-MAHAjan","download_url":"https://codeload.github.com/Vedant-MAHAjan/Node-App-Containerization/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":245523964,"owners_count":20629578,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["docker","docker-compose","nodejs"],"created_at":"2024-12-03T15:20:00.625Z","updated_at":"2026-04-10T21:06:24.113Z","avatar_url":"https://github.com/Vedant-MAHAjan.png","language":"HTML","funding_links":[],"categories":[],"sub_categories":[],"readme":"# 💻 Developing with Docker 🐳\n\nThis demo app shows a simple user profile app set up using \n- index.html with pure js and css styles\n- nodejs backend with express module\n- mongodb for data storage\n\nAll components are docker-based\n\n## With Docker\n\n#### To start the application\n\nStep 1: Create docker network\n\n    docker network create mongo-network \n\nStep 2: start mongodb \n\n    docker run -d -p 27017:27017 -e MONGO_INITDB_ROOT_USERNAME=admin -e MONGO_INITDB_ROOT_PASSWORD=password --name mongodb --net mongo-network mongo    \n\nStep 3: start mongo-express\n    \n    docker run -d -p 8081:8081 -e ME_CONFIG_MONGODB_ADMINUSERNAME=admin -e ME_CONFIG_MONGODB_ADMINPASSWORD=password --net mongo-network --name mongo-express -e ME_CONFIG_MONGODB_SERVER=mongodb mongo-express   \n\n_NOTE: creating docker-network in optional. You can start both containers in a default network. In this case, just emit `--net` flag in `docker run` command_\n\nStep 4: open mongo-express from browser\n\n    http://localhost:8081\n\nStep 5: create `user-account` _db_ and `users` _collection_ in mongo-express\n\nStep 6: Start your nodejs application locally - go to `app` directory of project \n\n    npm install \n    node server.js\n    \nStep 7: Access you nodejs application UI from browser\n\n    http://localhost:3000\n\n### With Docker Compose 📝\n\n#### To start the application\n\nStep 1: start mongodb and mongo-express\n\n    docker-compose -f docker-compose.yaml up\n    \n_You can access the mongo-express under localhost:8080 from your browser_\n    \nStep 2: in mongo-express UI - create a new database \"my-db\"\n\nStep 3: in mongo-express UI - create a new collection \"users\" in the database \"my-db\"       \n\nStep 4: build a docker image from the application\n\n    docker build -t my-app:1.0 .       \n    \nThe dot \".\" at the end of the command denotes location of the Dockerfile.\n\nStep 5: access the nodejs application from browser \n\n    http://localhost:3000\n    \n## Node Application\n\n### Default profile\n    \n![image](https://github.com/Vedant-MAHAjan/Node-App-Containerization/assets/88843623/fead9ef4-33fb-4060-92c1-e68d8e6ee591)\n\n### Updated profile\n\n![image](https://github.com/Vedant-MAHAjan/Node-App-Containerization/assets/88843623/071f8b1e-a9a0-4823-9268-ce9c94dd7dbf)\n\n## MongoDB Database \n\n### Before updating the profile\n\n![image](https://github.com/Vedant-MAHAjan/Node-App-Containerization/assets/88843623/4d1d415c-116d-4ec0-867d-403cf2d7e136)\n\n### After updating the profile\n\n* New Database created\n* New Collection created\n* Entry of the updated profile added\n\n![image](https://github.com/Vedant-MAHAjan/Node-App-Containerization/assets/88843623/66c412fd-a27b-4359-9c53-c9e995582d25)\n\n* Click on the \"my-db\" database\n* Click on the \"users\" collection\n* The updated profile data will be stored\n\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fvedant-mahajan%2Fnode-app-containerization","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fvedant-mahajan%2Fnode-app-containerization","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fvedant-mahajan%2Fnode-app-containerization/lists"}