{"id":18986828,"url":"https://github.com/karllhughes/node-docker-demo","last_synced_at":"2025-04-19T20:45:04.025Z","repository":{"id":77520174,"uuid":"116293034","full_name":"karllhughes/node-docker-demo","owner":"karllhughes","description":"A simple application to demonstrate using Docker for local NodeJS app development","archived":false,"fork":false,"pushed_at":"2018-10-15T02:15:30.000Z","size":114,"stargazers_count":33,"open_issues_count":2,"forks_count":57,"subscribers_count":3,"default_branch":"master","last_synced_at":"2025-03-29T13:12:14.250Z","etag":null,"topics":["docker","nodejs","postgresql","sequelize"],"latest_commit_sha":null,"homepage":"","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/karllhughes.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":"2018-01-04T18:22:13.000Z","updated_at":"2023-03-12T11:18:47.000Z","dependencies_parsed_at":"2023-03-17T10:00:33.357Z","dependency_job_id":null,"html_url":"https://github.com/karllhughes/node-docker-demo","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/karllhughes%2Fnode-docker-demo","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/karllhughes%2Fnode-docker-demo/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/karllhughes%2Fnode-docker-demo/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/karllhughes%2Fnode-docker-demo/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/karllhughes","download_url":"https://codeload.github.com/karllhughes/node-docker-demo/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":249795659,"owners_count":21326780,"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","nodejs","postgresql","sequelize"],"created_at":"2024-11-08T16:37:08.811Z","updated_at":"2025-04-19T20:45:04.006Z","avatar_url":"https://github.com/karllhughes.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Node Docker Demo\n\nThis is a simple application to demonstrate using Docker for local NodeJS app development. It uses Node v9, Express, Sequelize and Postgres for data storage, and Handlebars for views.\n\n## Prerequisites\n\n- [Docker 17.0+](https://docker.com)\n\n## Quickstart\n\n- Clone this repo: `git clone https://github.com/karllhughes/node-docker-demo.git`\n  - Note: The `master` branch has all the Docker-related files included, while the `start-here` branch does not. If you plan on doing the tutorial written for Javascript January, use the `start-here` branch, but if you want something that works right away, use the `master` branch.\n- Make sure Docker is running and that you're using version 17+ by running: `docker -v`\n- Run `docker build -t node-docker .` to build a local version of the image.\n- Start a postgres database container _before_ you start the application: `docker run -d --rm -p 5432:5432 -e POSTGRES_USER=admin -v $(pwd)/.data:/var/lib/postgresql/data -v $(pwd)/sql:/sql --name nd-db postgres:9.6`\n  - Wait a few seconds for the database to boot up before running any queries on it, especially if this is your first time running the application.\n- If it's your first time, run the migrations to create the database table: `docker exec nd-db psql admin admin -f /sql/migrations.sql`\n- You can also seed the database with dummy date using: `docker exec nd-db psql admin admin -f /sql/seeds.sql`\n- Now you can run the application using Docker: `docker run --rm -p 3000:3000 -d -v $(pwd)/app:/src/app -v $(pwd)/public:/src/public --link nd-db --name nd-app node-docker`\n- Check that the containers are running by typing `docker ps` and then navigating to `http://localhost:3000/` in your browser.\n- To shut the application down, enter the command `docker stop nd-app nd-db`\n\nIf you're new to Docker, be sure to read the complete tutorial for explanations behind the Docker commands used.\n  \n## Contributing\n\nContributions on Github are welcome and appreciated! Submit an issue or pull request with your improvements or suggestions.\n\n## License\n\nThis software is offered as-is under the MIT License:\n\n\u003e MIT License\n\u003e \n\u003e Copyright (c) 2017 Karl L. Hughes\n\u003e \n\u003e Permission is hereby granted, free of charge, to any person obtaining a copy\nof this software and associated documentation files (the \"Software\"), to deal\nin the Software without restriction, including without limitation the rights\nto use, copy, modify, merge, publish, distribute, sublicense, and/or sell\ncopies of the Software, and to permit persons to whom the Software is\nfurnished to do so, subject to the following conditions:\n\u003e \n\u003e The above copyright notice and this permission notice shall be included in all\ncopies or substantial portions of the Software.\n\u003e \n\u003e THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\nIMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\nFITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\nAUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\nLIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\nOUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE\nSOFTWARE.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fkarllhughes%2Fnode-docker-demo","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fkarllhughes%2Fnode-docker-demo","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fkarllhughes%2Fnode-docker-demo/lists"}