From bacf26e75d1aa0eef45c2db4252db10ec930a6b5 Mon Sep 17 00:00:00 2001 From: felix Date: Tue, 18 Nov 2025 12:25:06 +0100 Subject: [PATCH 1/4] Update README.md --- README.md | 24 +++++++++++++++++++----- 1 file changed, 19 insertions(+), 5 deletions(-) diff --git a/README.md b/README.md index 4fa218d..bd0a6b2 100644 --- a/README.md +++ b/README.md @@ -2,14 +2,28 @@ Backend for the organization portal application, based on the mu.semte.ch microservices stack. -## How to - ### Boot up the system in DEV environment - cd /path/to/mu-project - docker-compose -f docker-compose.yml -f docker-compose.dev.yml up + cd /path/to/app-organization-portal + docker compose -f docker-compose.yml -f docker-compose.dev.yml up -You can shut down using `docker-compose stop` and remove everything using `docker-compose rm`. +You can shut down using `docker compose stop` and remove everything using `docker compose rm`. + +#### Trick +If you think typing the full command takes too long every time, run this in your shell: + +``` +# Assumes you are in root of app-organization-portal +echo "COMPOSE_FILE=docker-compose.yml:docker-compose.dev.yml:docker-compose.override.yml" > .env +touch docker-compose.override.yml +``` +Now you can just run `docker compose up` and it will take the config files into account. +If you want to go a step further, and still think (like most of us) that `docker compose` is too long to type, you can alias it: +``` +echo "alias drc='docker compose'" >> ~/.bashrc +echo "alias drcl='docker compose logs -ft --tail=100'" >> ~/.bashrc +``` +Now everywhere `drc up -d` will work as shorthand for `docker compose up -d`. #### Setup consumers From 49ac622757b2312f2985042d578073d9c60040db Mon Sep 17 00:00:00 2001 From: felix Date: Tue, 18 Nov 2025 12:25:12 +0100 Subject: [PATCH 2/4] Remove non needed example --- .env.example | 1 - 1 file changed, 1 deletion(-) delete mode 100644 .env.example diff --git a/.env.example b/.env.example deleted file mode 100644 index f2251e5..0000000 --- a/.env.example +++ /dev/null @@ -1 +0,0 @@ -COMPOSE_FILE=docker-compose.yml:docker-compose.dev.yml \ No newline at end of file From 3b0131f3983fafea04e7838eea91f5bc1a280bf2 Mon Sep 17 00:00:00 2001 From: felix Date: Tue, 18 Nov 2025 12:25:21 +0100 Subject: [PATCH 3/4] some migrations to make OP work out of the box --- ...0821-add-status-to-bestuurseenheden.sparql | 20 +++++++++++ ...8121407-add-missing-concept-schemes.sparql | 33 +++++++++++++++++++ 2 files changed, 53 insertions(+) create mode 100644 config/dev-migrations/20251118120821-add-status-to-bestuurseenheden.sparql create mode 100644 config/dev-migrations/20251118121407-add-missing-concept-schemes.sparql diff --git a/config/dev-migrations/20251118120821-add-status-to-bestuurseenheden.sparql b/config/dev-migrations/20251118120821-add-status-to-bestuurseenheden.sparql new file mode 100644 index 0000000..49bc2cc --- /dev/null +++ b/config/dev-migrations/20251118120821-add-status-to-bestuurseenheden.sparql @@ -0,0 +1,20 @@ +DELETE { + GRAPH ?g { + ?s a . + ?s ?status. + } +} +INSERT { + GRAPH ?g { + ?s . + } +} +WHERE { + GRAPH ?g { + ?s a . + + OPTIONAL { + ?s ?status. + } + } +} \ No newline at end of file diff --git a/config/dev-migrations/20251118121407-add-missing-concept-schemes.sparql b/config/dev-migrations/20251118121407-add-missing-concept-schemes.sparql new file mode 100644 index 0000000..316496c --- /dev/null +++ b/config/dev-migrations/20251118121407-add-missing-concept-schemes.sparql @@ -0,0 +1,33 @@ +INSERT DATA { + GRAPH { + + + + "Organisatie status code" . + . + "b8dcb04f0d1feb86ff01cc0677363b20" . + "63cc561de9188d64ba5840a42ae8f0d6" . + . + . + . + . + . + . + "In oprichting" . + . + . + . + "Niet Actief" . + "abf4fee82019f88cf122f986830621ab" . + . + "Actief" . + . + "d02c4e12bf88d2fdf5123b07f29c9311" . + . + + + + + } + +} From 10b8b0dd0c57d67b03a70a780c1d2824e40656b3 Mon Sep 17 00:00:00 2001 From: felix Date: Tue, 18 Nov 2025 12:28:21 +0100 Subject: [PATCH 4/4] update README.md --- README.md | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index bd0a6b2..c98fd33 100644 --- a/README.md +++ b/README.md @@ -9,7 +9,19 @@ Backend for the organization portal application, based on the mu.semte.ch micros You can shut down using `docker compose stop` and remove everything using `docker compose rm`. -#### Trick +You need to wait until the migrations are ready. + +After that, you need to trigger the ES index manually. + +You can do it by: +``` +# Assumes you are in root of app-organization-portal +/bin/bash scripts/reset-elastic.sh +``` +And follow the steps. It takes a bit, from an install from scratch, about 10 mins. (Mileage may vary) + + +#### Tricks to make it a bit easier. If you think typing the full command takes too long every time, run this in your shell: ```