Backend for forwarding and storing of health-related data
helseopplysninger
├── .docker
│ ├── builder # Dockerfile used to create a cache-image for multistage builds
│ ├── config # Config files used by services in docker-compose
│ ├── test # Python script to publish fhir-messages on kafka, used for for local testing
│ └── docker-compose.yml # Setup a complete environment for local testing
├── .github
│ ├── ISSUE_TEMPLATE # Templates used when creating issues on GitHub
│ ├── workflows # GitHub-action workflows used for CI/CD
│ └── dependabot.yml # Instructions regarding auto-updating for dependencies
├── .scripts
│ ├── licence-to-sarif.js # Node-script to convert qodana-license-audit-report to sarif format
│ └── run-e2e # Bash script to run end-2-end tests
├── apps # The various applications\microservices (gradle-projects)
├── docs
│ ├── adrs # Architecture Decision Records
│ ├── images # Images used in documentation
│ ├── pipeline # CI/CD pipeline documentation
│ ├── test # Test strategy documentation
│ └── _config.yml # Github-Pages config
├── kafka # NAIS templates for kafka topics
├── libs # Common libraries (gradle-projects) used by the applications
├── .dockerignore
├── .editorconfig # IntelliJ IDEA code style settings
├── .gitattributes
├── .gitignore
├── CODEOWNERS
├── Dockerfile # Multistage dockerfile used to create deployable docker-image. Used by all apps
├── LICENSE.md # MIT license
├── README.md
├── SECURITY.md # Instructions regarding security practices
├── build.gradle.kts
├── gradle.properties
├── gradlew
├── gradlew.bat
└── settings.gradle.kts
Run ./gradlew build
To reach the mock oauth2 server you have to make a new mapping in the hosts file. To modify the /etc/hosts file
127.0.0.1 mock-oauth2-service
To run docker-compose from root, use the file flag: -f .docker/docker-compose.yml
Add the flag -p hops
for naming the composed project.
Start the whole shebang:
docker-compose -f .docker/docker-compose.yml -p hops up -d
Stop the whole shebang:
docker-compose -f .docker/docker-compose.yml -p hops down
Start a single app:
docker-compose -f .docker/docker-compose.yml up hops-eventstore
When using docker-compose, the services are configured to use a proxy, and will therefore be available on http://<app name>.local.gl:8080
e.g:
http://hops-api.local.gl:8080
http://hops-eventstore.local.gl:8080
http://hops-fileshare.local.gl:8080
You can set up a proxy for any service in docker-compose with the following config:
services:
some-service:
expose: [8080]
environment:
VIRTUAL_HOST: some-service.local.gl
VIRTUAL_PORT: 8080
NOTE: All apps are dependent on mock-oauth2-service
and postgres
see docker-compose.yml
Recipe for this monorepo:
./gradlew apps:${project}:${task}
Start a single app:
./gradlew apps:hops-api:run
Build a libraries dependent apps:
./gradlew libs:hops-common-core:buildDependents
For each app:
helseopplysninger:apps:hops-eventsinkkafka
(or one of the other apps)run
docker-compose -f .docker/docker-compose.yml up -d pgadmin kafdrop
After starting the Kafka with docker-compose, go to localhost:9000
After starting the Postgres with docker-compose, go to localhost:5050
Log on to pgAdmin with user: admin@admin.com admin
Log on to postgres db with user: Welcome01