{"id":17683209,"url":"https://github.com/nemanjam/mern-docker","last_synced_at":"2025-05-12T22:11:44.563Z","repository":{"id":102334766,"uuid":"186472198","full_name":"nemanjam/mern-docker","owner":"nemanjam","description":"Dockerized MERN boilerplate with CRUD Todo app.","archived":false,"fork":false,"pushed_at":"2022-12-03T07:39:38.000Z","size":26,"stargazers_count":12,"open_issues_count":0,"forks_count":7,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-04-01T04:07:44.359Z","etag":null,"topics":["boilerplate","crud","docker","express","mern","mongodb","nodejs","reactjs"],"latest_commit_sha":null,"homepage":"https://mern-docker-todo.herokuapp.com","language":"JavaScript","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/nemanjam.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":"security/cert.key","support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2019-05-13T18:12:11.000Z","updated_at":"2023-11-12T16:14:40.000Z","dependencies_parsed_at":null,"dependency_job_id":"0df8776e-7912-4a2a-81be-91b91204804e","html_url":"https://github.com/nemanjam/mern-docker","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nemanjam%2Fmern-docker","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nemanjam%2Fmern-docker/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nemanjam%2Fmern-docker/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nemanjam%2Fmern-docker/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/nemanjam","download_url":"https://codeload.github.com/nemanjam/mern-docker/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":249942353,"owners_count":21349005,"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":["boilerplate","crud","docker","express","mern","mongodb","nodejs","reactjs"],"created_at":"2024-10-24T09:44:40.280Z","updated_at":"2025-04-20T18:32:36.902Z","avatar_url":"https://github.com/nemanjam.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Mern Docker\n\n## Containers\n\n* `client` with React on `https://localhost:3000` route\n* `server` with Express on `https://localhost:5000` route\n* `mongo` with MongoDB\n* `adminmongo` with AdminMongo on `http://localhost:1234` route\n\n## Usage\n\n`docker-compose up -d` or for every container separately `docker-compose up -d client server adminmongo`\n\nGet in to container and install more dependecies with `docker exec -it server /bin/sh` or `docker exec -it client /bin/sh` and then `npm install whatewer`.\n\nGet logs from container to check everything is running correctly with `docker logs --tail 50 server` or `docker logs --tail 50 client`\n\nShut down containers with `docker-compose down`.\n\nIf you change `Dockerfile` rebuild container with `docker-compose build server`. Container names are `client`, `server`, `mongo` and `adminmongo`.\n\nAccess React app on `http://localhost:3000` and test the server on `https://localhost:5000/api/message`. Generate your own ssl keys and put them in `/security` folder if you like. Connection to the mongodb is in the `/config/dev.js`. Access adminmongo on `http://localhost:1234`.\n\n## Credits\n\nCRUD Todo app repo is here [seeschweiler/mern-stack-part-04](https://github.com/seeschweiler/mern-stack-part-04) and the link of the tutorial is here [The MERN Stack Tutorial — Building A React CRUD Application From Start To Finish](https://medium.com/codingthesmartway-com-blog/the-mern-stack-tutorial-building-a-react-crud-application-from-start-to-finish-part-1-d8d701c2995).\n\nDocker tutorial is here [How to create a full stack React/Express/MongoDB app using Docker](https://medium.freecodecamp.org/create-a-fullstack-react-express-mongodb-app-using-docker-c3e3e21c4074).\n\nDon't be confused there are some changes in the code to make it work. \n\n## Additional notes\n\nTested on Windows using Ubuntu 18.04 VirtualBox guest. \n\nFor nodemon restart to work there is `-L` flag in `\"server\": \"nodemon -L server.js\"` in `package.json`. \n\nFor create-react-app to live reload there is `CHOKIDAR_USEPOLLING=true` environment var in `docker-compose.yml`. \n\nFor mongo volume to work in the Windows VirtualBox shared folder there is `volumes: mongodata:`. \n\nNote that `command` in the `docker-compose.yml` overrides the `CMD` in the `Dockerfile`.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnemanjam%2Fmern-docker","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fnemanjam%2Fmern-docker","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnemanjam%2Fmern-docker/lists"}