{"id":15783230,"url":"https://github.com/brisinger/dockerapp","last_synced_at":"2026-04-15T10:34:17.048Z","repository":{"id":186492444,"uuid":"675259590","full_name":"Brisinger/dockerApp","owner":"Brisinger","description":"User Profile App Containerized and deployed and built from image pushed to AWS ECR","archived":false,"fork":false,"pushed_at":"2023-08-06T10:37:39.000Z","size":5933,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-09-19T11:48:42.933Z","etag":null,"topics":["aws","docker","docker-compose","ecr-repositories","javascript","mongodb","mongoexpress","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/Brisinger.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}},"created_at":"2023-08-06T10:26:17.000Z","updated_at":"2023-08-06T10:41:06.000Z","dependencies_parsed_at":null,"dependency_job_id":"682645a3-79c9-4240-88cd-c640148c71f4","html_url":"https://github.com/Brisinger/dockerApp","commit_stats":null,"previous_names":["brisinger/dockerapp"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/Brisinger/dockerApp","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Brisinger%2FdockerApp","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Brisinger%2FdockerApp/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Brisinger%2FdockerApp/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Brisinger%2FdockerApp/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Brisinger","download_url":"https://codeload.github.com/Brisinger/dockerApp/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Brisinger%2FdockerApp/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":31837233,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-15T10:26:52.245Z","status":"ssl_error","status_checked_at":"2026-04-15T10:26:51.649Z","response_time":63,"last_error":"SSL_read: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"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":["aws","docker","docker-compose","ecr-repositories","javascript","mongodb","mongoexpress","nodejs"],"created_at":"2024-10-04T19:40:43.515Z","updated_at":"2026-04-15T10:34:17.011Z","avatar_url":"https://github.com/Brisinger.png","language":"HTML","funding_links":[],"categories":[],"sub_categories":[],"readme":"## demo app - 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- build a docker image for node.js app from docker-compose.\n- publish the app image in private docker repository.\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 mongo-express and build docker image from application.\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: start node server inside the container instance of my-app:1.0.0\n\nStep 5: Enter into container host shell running my-app:1.0.0 application.\n    \n    docker exec -it my-app:1.0.0 /bin/sh\n\n    _NOTE: this will open the shell in cointainer with working directory `home/app`\n    executing the linux and node commands in current working directory. This is optional.\n\n    npm install\n    node server.js\n\n    _this would already be taken care of by docker file built from docker-compose in step 1.\n    _fastest way is from step 1 to step 3 and then execute step 5.\n    \nStep 5: access the nodejs application from browser \n\n    http://localhost:3000\n\n#### To build a docker image from the application instead of using docker-compose.\n\n    docker build -t my-app:1.0.0 .       \n\n_Note: Any changes made to application requires removing the my-app:1.0.0 image and executing step 1, this ensures rebuilding current application code image. Running containers and building image from application in docker-compose reuses any existing images of application with changes made to application code not being translated into application image.\n\nThe dot \".\" at the end of the command denotes location of the Dockerfile in current working directory.\n\n### From docker image pushed to AWS Elastic Container Registry (ECR)\n### Start the Application\n\nStep 1: Set up an AWS account with access key configured.\n\n    _You can configure access key for a user from IAM in AWS.\n\nStep 2: Under services search from the service ECR to manage container deployment.\n\nStep 3: Create a private container repository in ECR with name \"my-app\" same as your application.\n\nIn AWS each repository can have multiple images of the same application.\n\nStep 4: Once repository is create go to link Amazon ECR --\u003e Repositories and select \"my-app\" repository.\n\nStep 5: Select View Push Commands menu which is enable after selecting the repository.\n\nStep 6: Follow the steps in Modal that opens for Push command for \"my-app\" repository.\n\nStep 7: In ECR use the Domain name of Container Registry and set the environment variable DOCKER_REGISTRY.\n\n    Setting environment variable in local maching for linus and mac similar to windows.\n    Run the following commands in terminal.    \n        \n    export DOCKER_REGISTRY=\u003cContainer-Registry-URL\u003e\n    \n    Add this in shell configuration file e.g. ~/.zshrc or ~/.bashrc, ~/.bash_profile etc.\n    Replace \u003cContainer-Registry-URL\u003e with the actual Domain URL or name of your Docker registry.\n    Save the shell configuration file and restart the shell in terminal\n\n    source ~/.zshrc\n\n    Now, the \"DOCKER_REGISTRY\" environment variable will be available in all new terminal automatically loaded from your shell configuration files e.g. ~/.zshrc or ~/.bashrc, ~/.bash_profile etc.\n\nStep 8: Use the environment variable DOCKER_REGISTRY in your shell or a configuration file to store the registry URL, and then use that variable in your docker-compose.yml for pulling images for services from AWS ECR under services for image as '${DOCKER_REGISTRY}/my-app:1.0.0'.\n\nStep 9: Pull the image for your application from AWS ECR and start all your containers from docker-compose.yaml file.\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 10: in mongo-express UI - create a new database \"my-db\"\n\nStep 11: in mongo-express UI - create a new collection \"users\" in the database \"my-db\"       \n    \nStep 12: node server inside the container instance of my-app:1.0.0 will be running on port 3000. Access the nodejs application from browser \n\n    http://localhost:3000\n\nHappy Coding!","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbrisinger%2Fdockerapp","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fbrisinger%2Fdockerapp","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbrisinger%2Fdockerapp/lists"}