{"id":25353951,"url":"https://github.com/aborroy/solr-sharding-docker-compose","last_synced_at":"2025-10-04T06:07:46.456Z","repository":{"id":140884646,"uuid":"294730551","full_name":"aborroy/solr-sharding-docker-compose","owner":"aborroy","description":"Docker Compose deployment templates for Alfresco SOLR Sharding methods.","archived":false,"fork":false,"pushed_at":"2020-09-11T16:50:39.000Z","size":24,"stargazers_count":2,"open_issues_count":0,"forks_count":3,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-06-09T04:03:22.047Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Dockerfile","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"gpl-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/aborroy.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,"zenodo":null}},"created_at":"2020-09-11T15:20:40.000Z","updated_at":"2021-10-01T16:22:42.000Z","dependencies_parsed_at":null,"dependency_job_id":"5d09c164-eaaa-47ef-9492-8dfd101f1644","html_url":"https://github.com/aborroy/solr-sharding-docker-compose","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/aborroy/solr-sharding-docker-compose","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/aborroy%2Fsolr-sharding-docker-compose","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/aborroy%2Fsolr-sharding-docker-compose/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/aborroy%2Fsolr-sharding-docker-compose/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/aborroy%2Fsolr-sharding-docker-compose/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/aborroy","download_url":"https://codeload.github.com/aborroy/solr-sharding-docker-compose/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/aborroy%2Fsolr-sharding-docker-compose/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":278272557,"owners_count":25959599,"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","status":"online","status_checked_at":"2025-10-04T02:00:05.491Z","response_time":63,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"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":[],"created_at":"2025-02-14T19:56:09.673Z","updated_at":"2025-10-04T06:07:46.452Z","avatar_url":"https://github.com/aborroy.png","language":"Dockerfile","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Alfresco SOLR Sharding Docker Compose Templates\n\nDocker Compose deployment templates for Alfresco SOLR Sharding methods.\n\nDocumentation for Sharding Methods available in https://docs.alfresco.com/sie/concepts/solr-shard-approaches.html\n\n* [acl_id](acl_id)\n* [date](date)\n* [db_id](db_id)\n* [db_id_range](db_id_range)\n* [explicit_id](explicit_id)\n* [explicit_id_fallback_lris](explicit_id_fallback_lris)\n* [lris](lris)\n* [mod_acl_id](mod_acl_id)\n* [property](property)\n\n* [ssl_db_id](ssl_db_id): Sample on using DB_ID Sharding method configured with mTLS protocol\n\nEvery deployment includes 2 SOLR Servers (`solr6` and `solr62`) as sample implementation, but it can be used more if required.\n\nSearch Services Docker Image has been customized in order to apply the right properties for every Sharding Method.\n\nSome sharding methods (`explicit_id`, `explicit_id_fallback_lris` and `property`) require using a custom Content Model. In order to deploy this model, Alfresco Docker Image has been customized.\n\n## Base Template\n\nSOLR Docker Containers include the ID of the Shard, the number of shards and other required information as Docker Image arguments in `docker-compose.yml` file.\n\n```\nsolr6:\n    build:\n      context: ./search\n      args:\n        ALFRESCO_COMMS: none\n        NUM_SHARDS: \"2\"\n        SHARD_ID: \"0\"\n```\n\nCustomization in `search/Dockerfile` modifies SOLR Core configuration in the `rerank` template in order to set the right values for the selected Sharding Method.\n\n```\n# Sharding ACL_ID\nARG NUM_SHARDS\nENV NUM_SHARDS $NUM_SHARDS\nARG SHARD_ID\nENV SHARD_ID $SHARD_ID\n\nRUN sed -i '/^bash.*/i echo \"\\nshard.instance=${SHARD_ID}\" \u003e\u003e ${DIST_DIR}/solrhome/templates/rerank/conf/solrcore.properties\\n' \\\n    ${DIST_DIR}/solr/bin/search_config_setup.sh \u0026\u0026 \\\n    sed -i '/^bash.*/i echo \"\\nshard.count=${NUM_SHARDS}\" \u003e\u003e ${DIST_DIR}/solrhome/templates/rerank/conf/solrcore.properties\\n' \\\n    ${DIST_DIR}/solr/bin/search_config_setup.sh \u0026\u0026 \\\n    sed -i '/^bash.*/i sed -i \"'\"s/shard.method=DB_ID/shard.method=ACL_ID/g\"'\" ${DIST_DIR}/solrhome/templates/rerank/conf/solrcore.properties\\n' \\\n    ${DIST_DIR}/solr/bin/search_config_setup.sh;\n```\n\n# How to use this composition\n\n## Start Docker\n\nStart docker and check the ports are correctly bound.\n\n```bash\n$ docker-compose up --build --force-recreate\n$ docker ps --format '{{.Names}}\\t{{.Image}}\\t{{.Ports}}'\n\ndb_id_alfresco_1    db_id_alfresco                    8000/tcp\ndb_id_postgres_1    postgres:11.7                     0.0.0.0:5432-\u003e5432/tcp\ndb_id_activemq_1    alfresco/alfresco-activemq:5.15.8 0.0.0.0:5672-\u003e5672/tcp, ...\ndb_id_solr6_1       db_id_solr6                       0.0.0.0:8983-\u003e8983/tcp\ndb_id_solr62_1      db_id_solr62                      0.0.0.0:8984-\u003e8983/tcp\ndb_id_transform-core-aio_1\talfresco/alfresco-transform-core-aio:2.3.4\t0.0.0.0:8090-\u003e8090/tcp\n```\n\n## Access\n\nUse the following username/password combination to login in Alfresco services.\n\n - User: admin\n - Password: admin\n\nAlfresco and related web applications can be accessed from the below URIs when the servers have started.\n\n```\nhttp://localhost:8080/alfresco      - Alfresco Repository (REST)\nhttp://localhost:8983/solr          - Alfresco Search Services (Shard 1)\nhttp://localhost:8984/solr          - Alfresco Search Services (Shard 2)\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Faborroy%2Fsolr-sharding-docker-compose","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Faborroy%2Fsolr-sharding-docker-compose","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Faborroy%2Fsolr-sharding-docker-compose/lists"}