{"id":37563941,"url":"https://github.com/dfds/harald","last_synced_at":"2026-01-16T09:11:56.965Z","repository":{"id":39860432,"uuid":"169268577","full_name":"dfds/harald","owner":"dfds","description":"Harald the Herald","archived":false,"fork":false,"pushed_at":"2025-03-20T08:05:25.000Z","size":612,"stargazers_count":0,"open_issues_count":9,"forks_count":1,"subscribers_count":6,"default_branch":"master","last_synced_at":"2025-03-20T09:23:31.064Z","etag":null,"topics":["self-service"],"latest_commit_sha":null,"homepage":null,"language":"C#","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/dfds.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":"2019-02-05T16:01:37.000Z","updated_at":"2025-03-20T08:05:28.000Z","dependencies_parsed_at":"2024-11-09T15:18:15.065Z","dependency_job_id":"5c0da35a-2560-40a7-9036-6aed82c9f88f","html_url":"https://github.com/dfds/harald","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/dfds/harald","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dfds%2Fharald","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dfds%2Fharald/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dfds%2Fharald/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dfds%2Fharald/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/dfds","download_url":"https://codeload.github.com/dfds/harald/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dfds%2Fharald/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28478049,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-01-16T06:30:42.265Z","status":"ssl_error","status_checked_at":"2026-01-16T06:30:16.248Z","response_time":107,"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":["self-service"],"created_at":"2026-01-16T09:11:56.822Z","updated_at":"2026-01-16T09:11:56.929Z","avatar_url":"https://github.com/dfds.png","language":"C#","funding_links":[],"categories":[],"sub_categories":[],"readme":"[![Build Status](https://dfds.visualstudio.com/DevelopmentExcellence/_apis/build/status/Harald-pipeline?branchName=master)](https://dfds.visualstudio.com/DevelopmentExcellence/_build/latest?definitionId=1416\u0026branchName=master)\n[![Build Status](https://dfds.visualstudio.com/DevelopmentExcellence/_apis/build/status/Harald-pipeline?branchName=master\u0026stageName=CI)](https://dfds.visualstudio.com/DevelopmentExcellence/_build/latest?definitionId=1416\u0026branchName=master)\n\n# Harald\n\nThe notification service aka herold aka herald.\n\n## Getting started\n\n### Prerequisites:\n\n1. dotnet core 2.2 sdk\n2. docker\n3. docker-compose\n4. bash\n\n### Directory outline\n\nThe most **significant** items found in the repository/directory root are:\n\n```text\n.\n├── Dockerfile\n├── README.md\n├── add-migration.sh\n├── api-contracts/\n├── db/\n├── docker-compose.yml\n├── docs/\n├── k8s/\n├── pipeline.sh\n└── src/\n```\n_Please note: you'd might also find other items in the repository/directory root._\n\nHere is a small description for each of the items:\n\n| Item               | Description                                                                                                                                                                |\n|--------------------|----------------------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| Dockerfile         | Describes how the runtime environment for the actual application should look like.                                                                                         |\n| README.md          | _This_ readme file                                                                                                                                                         |\n| add-migration.sh   | Util for quickly generating a database migration script that follows default conventions. Run it like this: `./add-migration.sh \"\u003csmall description of you change here\u003e\"`. |\n| api-contracts/     | Directory that contains the current OpenApi contract(s) exposed from the service.                                                                                          |\n| db/                | Directory that contains all things related to the database setup e.g. Dockerfile for init migration container, migration script etc.                                       |\n| docker-compose.yml | Docker-compose file for bringing all external dependencies up (some in a 'faked-out' version).                                                                             |\n| docs/              | Directory for any documents that take part in documenting the service e.g. domain events.                                                                                  |\n| k8s/               | Directory containing all Kubernetes manifests used to describe the desired runtime state for the service in Kubernetes.                                                    |\n| pipeline.sh        | _The_ shell script used to implement the _continous integration_ pipeline. The script also generates a docker container image as a deployment artifact.                    |\n| src/               | The _main_ directory for all the source code for the service.                                                                                                              |\n\n### Running the service\n\nFirst restore dependencies by runing the `./pipeline` script located in the repository root or by navigating to the `./src` folder and run `dotnet restore` like shown below:\n\n#### Pipeline script\n\n```bash\n./pipeline.sh\n```\n#### Manual restore\n\n```bash\ncd src\ndotnet restore\n```\n\n#### Start the application\n\nThen the application can be executed by the following (navigate to the `./src` folder):\n```bash\ndotnet run --project Harald.WebApi/\n```\n\n## Database\n\nThe database will initially start as empty. The image is constructed so that files can be added through the command below, and these will be run in date order (at least if you name the file right).\n\n### Local Development\n\nTo add a migration, run:\n\n```sh\n./add-migration.sh create capability table\n```\n\nWill create an empty migration file (e.g. `20181017194326_create_capability_table.sql`) in the `./db/migrations` folder. The file will be prefixed with YYMMDDHHMMSS.\n\nTo bring up a local postgres database with all migration scripts applied against it, set the environment variables in `docker-compose.yml` as needed (or use defaults), and run:\n\n```sh\ndocker-compose up --build\n```\n\nAfter adding new migrations, run `docker-compose down` and re-run the above command.\n\n## Domain Events\n\nDomain events consumed is following:\n* capability_created\n* member_joined_capability\n* member_left_capability\n\nFor information about these domain events refers to the [domain events in capability service](https://github.com/dfds/team-service/blob/master/docs/domain_events.md).\n\n## Integrations\n\n### Slack\n\nIn order to integrate with Slack, there has to be an OAuth Access Token defined.\nThis is constructed upon creation of _App_ in the [Admin-section](https://api.slack.com/apps) of Slack. If the key has to be rolled over, one need to reinstall the app in Slack.\n\nEnsure that the \"user\" installing the app is a dedicated user just for that purpose. Due to some funkiness with how the Slack API works, some actions will be seen as done by the \"app\" and some by the user who has \"installed\" the app.\n\n## TODO\n\n* Improve resiliency.\n* Make sure all integrations are idempotent.\n* Better test coverage.\n\n\n## Deployment prerequisites\n\nIf the scoped service account is missing for deployment, see https://wiki.dfds.cloud/en/teams/devex/selfservice/Kubernetes-selfservice-deployment-setup\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdfds%2Fharald","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdfds%2Fharald","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdfds%2Fharald/lists"}