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 diff --git a/README.md b/README.md index 4fa218d..c98fd33 100644 --- a/README.md +++ b/README.md @@ -2,14 +2,40 @@ 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`. + +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: + +``` +# 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 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" . + . + + + + + } + +}