{"id":30092751,"url":"https://github.com/sgoranov/identity-link-docker","last_synced_at":"2026-05-03T23:34:05.503Z","repository":{"id":307499863,"uuid":"1029497008","full_name":"sgoranov/identity-link-docker","owner":"sgoranov","description":"This repository provides a simple way to run the entire Identity Link microservice  architecture using Docker and Docker Compose. ","archived":false,"fork":false,"pushed_at":"2026-01-30T17:34:39.000Z","size":17,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"develop","last_synced_at":"2026-01-31T10:34:35.420Z","etag":null,"topics":["docker","docker-compose"],"latest_commit_sha":null,"homepage":"","language":"Shell","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/sgoranov.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,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2025-07-31T06:20:06.000Z","updated_at":"2026-01-30T17:34:43.000Z","dependencies_parsed_at":"2025-10-08T08:21:05.877Z","dependency_job_id":"62943aa5-91da-45cd-ae0e-06cd7ccdf0fc","html_url":"https://github.com/sgoranov/identity-link-docker","commit_stats":null,"previous_names":["sgoranov/identity-link-docker"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/sgoranov/identity-link-docker","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sgoranov%2Fidentity-link-docker","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sgoranov%2Fidentity-link-docker/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sgoranov%2Fidentity-link-docker/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sgoranov%2Fidentity-link-docker/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/sgoranov","download_url":"https://codeload.github.com/sgoranov/identity-link-docker/tar.gz/refs/heads/develop","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sgoranov%2Fidentity-link-docker/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":32589259,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-03T22:12:39.696Z","status":"ssl_error","status_checked_at":"2026-05-03T22:09:10.534Z","response_time":103,"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":["docker","docker-compose"],"created_at":"2025-08-09T08:04:07.883Z","updated_at":"2026-05-03T23:34:05.496Z","avatar_url":"https://github.com/sgoranov.png","language":"Shell","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Run Identity Link with Docker\n\nThis repository provides a simple way to run the entire Identity Link microservice \narchitecture using Docker and Docker Compose. With just one command, you can \nspin up all necessary services in a consistent and reproducible environment.\n\n## Getting Started\n\nBefore starting the services, make sure all required service repositories are \ncloned into this directory:\n\n```bash\ngit clone https://github.com/sgoranov/identity-link.git identity-link-core\ngit clone https://github.com/sgoranov/identity-link-db-users.git identity-link-db-users\ngit clone https://github.com/sgoranov/identity-link-db-clients.git identity-link-db-clients\ngit clone https://github.com/sgoranov/identity-link-2fa.git identity-link-2fa\ngit clone https://github.com/sgoranov/identity-link-bff.git identity-link-bff\n```\n\nThese repositories should exist as local folders inside identity-link-docker, \nmatching the directory structure expected by Docker Compose.\n\nIf you already have these repositories checked out elsewhere, you can create \nrelative symbolic links instead of cloning again:\n\n```bash\nln -rs ../existing/identity-link identity-link-core\nln -rs ../existing/identity-link-db-users identity-link-db-users\nln -rs ../existing/identity-link-db-clients identity-link-db-clients\nln -rs ../existing/identity-link-2fa identity-link-2fa\nln -rs ../existing/identity-link-2fa identity-link-bff\n```\n\nJust make sure the symlinks resolve to valid folders on the host, because Docker Compose will mount \nwhatever they point to into the containers.\n\n## Setup TLS Certificates \n\nBefore starting the Docker services, you need to generate and install the required TLS certificates using \nmkcert. This step ensures secure HTTPS communication for your local environment.\n\nRun the following commands:\n\n```bash\ncd config/certificates\nmkcert --install\nmkcert \"*.example.com\" localhost 127.0.0.1 ::1\n```\n\n - `mkcert --install` sets up a local Certificate Authority (CA) trusted by your system.\n - The second mkcert command generates certificates for the specified domains and IPs.\n - These certificates are used by the Docker services to enable HTTPS locally.\n\nMake sure you have mkcert installed on your machine before running these commands.\n\n## Update Your Hosts File\n\nTo properly test the system locally, you must add the following entries to your \nsystem's hosts file:\n\n```text\n127.0.0.1 protected.example.com\n127.0.0.1 auth.example.com\n```\n\n### Why is this necessary?\n\n- **auth.example.com** represents the **Identity Link** service.\n- **protected.example.com** represents the **oidc-test-client**, which you can use to test the OpenID Connect authentication flow.\n\nBy mapping these domains to `127.0.0.1`, your local machine will resolve requests for these test domains to your Docker services, enabling HTTPS with the certificates you generated.\n\n\n## Start/Stop the Services\n\n```bash\n./start.sh\n```\n\nThis will:\n\n - Load environment variables from .env and .env.local (if present)\n - Launch all required containers in detached mode using Docker Compose\n\n\n```bash\n./stop.sh\n```\n\nThis stops all running containers.\n\n### Useful Tips\n\n - Use _docker compose logs -f_ to monitor service logs\n - Use _docker compose ps_ to list running containers\n\n## Customizing Environment Configuration\n\nBy default, environment variables are defined in the .env file. To override any of them locally, \ncreate a _.env.local_ file:\n\n```bash\ntouch .env.local\n```\n\nThen add only the variables you want to override:\n\n```dotenv\nDB_PASSWORD=mysecret\n```\n\nThe .env.local file is automatically loaded when running start.sh or stop.sh.\n\n.env.local is typically included in .gitignore to keep secrets out of version control.\n\n## Environment Variables for Docker\n\nImportant: The Docker environment uses a dedicated environment file (e.g. .env, .env.local) that is \nseparate from the application’s Symfony .env file.\n\nThe Docker .env is used only by Docker Compose and defines the \nsetup parameters needed to build and run the containers.\n\n**Note:** DB_USER and DB_PASSWORD must match between Docker’s environment and \nyour Symfony application’s .env configuration, or the application will fail \nto connect to the database.\n\n### List of Environment Variables\n\n| Variable                  | Description                                           | Example Value                                                                        |\n|---------------------------|-------------------------------------------------------|--------------------------------------------------------------------------------------|\n| `DB_USER`                 | Database username (shared between app and services)   | `ChangeMe`                                                                           |\n| `DB_PASSWORD`             | Database password (shared between app and services)   | `ChangeMe`                                                                           |\n| `TEST_DATA_CLIENT_SECRET` | Test client secret                                    | `client`                                                                             |\n| `TEST_DATA_REDIRECT_URIS` | Redirect URIs for OAuth test client (comma-separated) | `https://protected.example.com/auth/callback,https://ui.example.com/bff/login_check` |\n| `TEST_DATA_USER_NAME`     | Username for the seeded test user                     | `user`                                                                               |\n| `TEST_DATA_USER_PASS`     | Password hash for the test user (e.g., bcrypt)        | `pass`                                                                               |\n| `TEST_DATA_GROUP_NAME`    | Name of the group assigned to the test user           | `group`                                                                              |\n\n## Additional Docker Services\n\nYour Docker setup includes several tools to assist with development and debugging.\n\n### Adminer – Database UI\n\nAdminer is a single-file UI for managing your PostgreSQL database.\n\n - Use case: Inspect tables, run SQL queries, debug data\n - Access: http://localhost/db\n\n### MailHog – SMTP Test Server\n\nMailHog catches emails sent from your application during development.\n\n - Use case: Test registration flows, password reset, etc.\n - SMTP port: localhost:9025\n - Web UI: http://localhost/mail\n\nNo real email is sent. All messages stay inside Docker for testing.\n\n### Redis Commander – Redis Web UI\n\nRedis Commander is a GUI for inspecting and modifying your Redis data.\n\n - Use case: Browse cache, sessions, Symfony rate limiters, etc.\n - Access: http://localhost/redis\n\n### Swagger UI – API Explorer\n\nSwagger UI lets you view and test API endpoints defined in the OpenAPI specification.\n\n - Use case: Interactively test API calls\n - Access: http://localhost/swagger\n\n\n## Generate a JWT Token\n\nYou’ll need a valid JWT token to use protected endpoints in Swagger.\n\nGenerate one using:\n\n```bash\ndocker exec -it core bash -c \"cd /var/www; php bin/console identity-link:generate-jwt\"\n```\n\nThe output token can then be pasted into the Authorize dialog in Swagger UI.\n\n## License\n\nIdentity Link is open source software licensed under the [MIT License](LICENSE), which permits reuse,\nmodification, and distribution with minimal restrictions.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsgoranov%2Fidentity-link-docker","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsgoranov%2Fidentity-link-docker","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsgoranov%2Fidentity-link-docker/lists"}