{"id":17765664,"url":"https://github.com/thomasvitale/spring-boot-multitenancy","last_synced_at":"2025-03-15T12:30:25.958Z","repository":{"id":167206928,"uuid":"637165014","full_name":"ThomasVitale/spring-boot-multitenancy","owner":"ThomasVitale","description":"Samples showing how to build multitenant applications with Java and Spring Boot","archived":false,"fork":false,"pushed_at":"2024-04-17T15:49:21.000Z","size":407,"stargazers_count":128,"open_issues_count":0,"forks_count":55,"subscribers_count":8,"default_branch":"main","last_synced_at":"2025-02-27T02:54:03.207Z","etag":null,"topics":["java","keycloak","micrometer","multitenancy","spring-boot","testcontainers"],"latest_commit_sha":null,"homepage":"","language":"Java","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/ThomasVitale.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":"2023-05-06T17:53:16.000Z","updated_at":"2025-02-21T17:05:45.000Z","dependencies_parsed_at":"2023-06-30T01:00:34.544Z","dependency_job_id":"4b08f249-fd71-4191-b949-fa8c39e5ba82","html_url":"https://github.com/ThomasVitale/spring-boot-multitenancy","commit_stats":null,"previous_names":["thomasvitale/spring-boot-multitenancy"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ThomasVitale%2Fspring-boot-multitenancy","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ThomasVitale%2Fspring-boot-multitenancy/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ThomasVitale%2Fspring-boot-multitenancy/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ThomasVitale%2Fspring-boot-multitenancy/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/ThomasVitale","download_url":"https://codeload.github.com/ThomasVitale/spring-boot-multitenancy/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":243730812,"owners_count":20338722,"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":["java","keycloak","micrometer","multitenancy","spring-boot","testcontainers"],"created_at":"2024-10-26T20:14:38.963Z","updated_at":"2025-03-15T12:30:24.867Z","avatar_url":"https://github.com/ThomasVitale.png","language":"Java","readme":"# Spring Boot Multitenancy\n\n## Stack\n\n* Java 21\n* Spring Boot 3.2\n* Grafana OSS\n\n## Usage\n\nYou can use Docker Compose to run the necessary backing services for observability, authentication, and AI.\n\nFrom the project root folder, run Docker Compose.\n\n```bash\ndocker-compose up -d\n```\n\nThe Instrument Service application can be run as follows to rely on Testcontainers to spin up a PostgreSQL database:\n\n```bash\n./gradlew bootTestRun\n```\n\nThe Edge Service application can be run as follows:\n\n```bash\n./gradlew bootRun\n```\n\nThe Chat Service application can be run using one of the two techniques described above. If you don't want to rely on Testcontainers,\nmake sure you have [Ollama](https://ollama.ai/) installed and the Llama2 model available (`ollama run llama2`).\n\nTwo tenants are configured: `dukes` and `beans`. Ensure you add the following configuration to your `hosts` file to resolve tenants from DNS names.\n\n```bash\n127.0.0.1       dukes.rock\n127.0.0.1       beans.rock\n```\n\nNow open the browser window and navigate to `http://dukes.rock/instruments/`. You'll be redirected to the Keycloak authentication page. Log in with `isabelle/password`. The result will be the list of instruments from the Dukes rock band.\n\nNow open another browser window and navigate to `http://beans.rock/instruments/`. You'll be redirected to the Keycloak authentication page. Log in with `bjorn/password`. The result will be the list of instruments from the Beans rock band.\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fthomasvitale%2Fspring-boot-multitenancy","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fthomasvitale%2Fspring-boot-multitenancy","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fthomasvitale%2Fspring-boot-multitenancy/lists"}