{"id":16365013,"url":"https://github.com/alexpunct/mongorestdocker","last_synced_at":"2025-04-14T13:22:00.138Z","repository":{"id":74356253,"uuid":"84245957","full_name":"alexpunct/mongorestdocker","owner":"alexpunct","description":"Node.js and Express.js REST API with MongoDB services Docker compose file. ","archived":false,"fork":false,"pushed_at":"2017-11-10T14:17:15.000Z","size":17,"stargazers_count":2,"open_issues_count":1,"forks_count":9,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-04-14T13:21:49.917Z","etag":null,"topics":["docker","docker-compose","docker-compose-template","expressjs","mongo","mongodb","nodejs","rest-api"],"latest_commit_sha":null,"homepage":null,"language":null,"has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"gpl-3.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/alexpunct.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","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":"2017-03-07T21:04:42.000Z","updated_at":"2019-01-23T18:36:03.000Z","dependencies_parsed_at":null,"dependency_job_id":"fed1fd7c-6e44-4ef9-b1e8-ffc576b167e3","html_url":"https://github.com/alexpunct/mongorestdocker","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/alexpunct%2Fmongorestdocker","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/alexpunct%2Fmongorestdocker/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/alexpunct%2Fmongorestdocker/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/alexpunct%2Fmongorestdocker/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/alexpunct","download_url":"https://codeload.github.com/alexpunct/mongorestdocker/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248886348,"owners_count":21177647,"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","docker-compose-template","expressjs","mongo","mongodb","nodejs","rest-api"],"created_at":"2024-10-11T02:42:21.613Z","updated_at":"2025-04-14T13:22:00.117Z","avatar_url":"https://github.com/alexpunct.png","language":null,"readme":"# Description\nNode.js and Express.js REST API with MongoDB services Docker compose file. You can use this for launching a REST api on your server very quickly. \nIt will create a MongoDB database with admin and database users and a REST service that will allow you to get and send data from Mongo. It will expose 2 ports, one for connecting directly to Mongo and one for the API. \nThe configuration is done through Environment variables which you can add in a `.env` file in this folder since it's already present in .gitignore so it won't be committed if you push this code to your fork. \nYou can view a step-by-step tutorial with how this file was created on my [Blog](http://blog.bejanalex.com/2017/03/mongodb-rest-api-interface-in-docker/)\n\n# Requirements\n\n[Docker](https://www.docker.com/community-edition#/download) and [Docker compose](https://docs.docker.com/compose/overview/) are required to run these services.\n\n# Running the services\n\n### Environment variables\n\nEither export each environment variable in the terminal session or add an `.env` file in this folder after cloning it. The following environment variables are available:\n\n- MONGODB_EXPOSED_PORT (the MongoDB port you will expose to the outside world)\n- MONGODB_ADMIN_USER (MongoDB admin user)\n- MONGODB_ADMIN_PASS (MongoDB admin password)\n- MONGODB_APPLICATION_DATABASE (MongoDB database for the REST Api Node.js application)\n- MONGODB_APPLICATION_USER (MongoDB REST Api database user)\n- MONGODB_APPLICATION_PASS (MongoDB REST Api database password)\n- REST_API_EXPOSED_PORT (REST Api port)\n- REST_API_APIKEY (REST Api Key that you will need to include as a URL parameter when making HTTP requests)\n\nHere is an example of my `.env` file I used for the Blog example. \n\n```\nMONGODB_EXPOSED_PORT=27017\nMONGODB_ADMIN_USER=admin\nMONGODB_ADMIN_PASS=adminP4ss\nMONGODB_APPLICATION_DATABASE=appdb\nMONGODB_APPLICATION_USER=appuser\nMONGODB_APPLICATION_PASS=appP4ss\nREST_API_EXPOSED_PORT=3000\nREST_API_APIKEY=ifna212ASFisfsjaAFFF\n```\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Falexpunct%2Fmongorestdocker","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Falexpunct%2Fmongorestdocker","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Falexpunct%2Fmongorestdocker/lists"}