{"id":21493844,"url":"https://github.com/grumpy-programmer/spring-mongo-demo","last_synced_at":"2025-03-17T11:44:21.147Z","repository":{"id":136549397,"uuid":"393339174","full_name":"grumpy-programmer/spring-mongo-demo","owner":"grumpy-programmer","description":null,"archived":false,"fork":false,"pushed_at":"2021-08-12T14:41:26.000Z","size":136,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-01-23T21:31:40.731Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Java","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/grumpy-programmer.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":"2021-08-06T10:16:42.000Z","updated_at":"2021-08-12T14:40:22.000Z","dependencies_parsed_at":null,"dependency_job_id":"f0ac4efc-a98a-417d-a848-434b9e25e602","html_url":"https://github.com/grumpy-programmer/spring-mongo-demo","commit_stats":null,"previous_names":[],"tags_count":3,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/grumpy-programmer%2Fspring-mongo-demo","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/grumpy-programmer%2Fspring-mongo-demo/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/grumpy-programmer%2Fspring-mongo-demo/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/grumpy-programmer%2Fspring-mongo-demo/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/grumpy-programmer","download_url":"https://codeload.github.com/grumpy-programmer/spring-mongo-demo/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":244029755,"owners_count":20386478,"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":[],"created_at":"2024-11-23T15:48:07.314Z","updated_at":"2025-03-17T11:44:21.123Z","avatar_url":"https://github.com/grumpy-programmer.png","language":"Java","readme":"# spring-mongo-demo\n\n## Pre requirements\n\n* java 11\n* docker\n* docker compose\n\n## Local development\n\nDocker compose contains following services:\n\n* mongo - the mongo database\n* mongo-express - the mongo web explorer http://localhost:8081\n\nTo setup environment for local development run\n\n```shell\ndocker-compose up -d\n```\n\nthis will download all needed images and create containers.\n\nTo stop\n\n```shell\ndocker-compose stop\n```\n\nTo remove (first stop)\n\n```shell\ndocker-compose rm\nrm -rf volumes\n```\n\n## Building gradle project\n\nUse gradle wrapper`./gradlew` script to build the application\n\n```shell\n./gradlew build\n```\n\n## Building docker image\n\nThe [Dockerfile](Dockerfile) to build docker image of the application.\n\nFor local development and testing\n\n```shell\ndocker build -t spring-mongo-demo .\n```\n\nFor building production docker image\n\n```shell\ndocker build -t ghcr.io/grumpy-programmer/spring-mongo-demo .\n```\n\nThis application is using github registry to store\nimages, [see more](https://docs.github.com/en/packages/working-with-a-github-packages-registry/working-with-the-container-registry)\n\nLogin to github registry\n\n```shell\n# using std input to provide password (GITHUB_TOKEN)\ndocker login ghcr.io -u USERNAME --password-stdin\n\n# setting password in command line\ndocker login --username USERNAME --password GITHUB_TOKEN ghcr.io\n```\n\n## Github actions\n\nThe build pipeline [.github/workflows/build.yml](.github/workflows/main.yml) builds gradle application, create docker\nimage and push the image to github registry.\n\nImages will have shared tag latest and unique with current version.\n\nPipeline will for each branch (except main) to build gradle application and docker image. For `main` branch additionally\ndocker image will be pushed to github registry.\n\nFor time optimization [github action cache](https://github.com/actions/cache) is added to pipeline.\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgrumpy-programmer%2Fspring-mongo-demo","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fgrumpy-programmer%2Fspring-mongo-demo","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgrumpy-programmer%2Fspring-mongo-demo/lists"}