Adding Lrs yetanalytics as new stack + others fixes#93
Open
jujusb wants to merge 33 commits into
Open
Conversation
There was a problem hiding this comment.
Pull request overview
This PR extends the SIMVA infrastructure stack by introducing a new YetAnalytics LRSQL (LRS) stack, improving local development workflows (notably local js-tracker usage in simva-api), and tightening several operational scripts around Keycloak admin handling, TLS/cert management, and startup/upgrade hooks.
Changes:
- Add a new
11-lrsstack (LRSQL + Postgres) and wire it into stack ordering and environment variables. - Improve local development ergonomics (simplified repo mounts + optional local
js-trackerbuild/install insimva-api). - Update Keycloak and Traefik/Nginx operational hooks (admin idempotency, migration/upgrade helpers, Nginx host generation, cert update/install tooling).
Reviewed changes
Copilot reviewed 26 out of 33 changed files in this pull request and generated 7 comments.
Show a summary per file
| File | Description |
|---|---|
| vagrant/helpers/installation.sh | Extends Vagrant provisioning to clone additional repos/plugins used by the stack. |
| docker-stacks/simva | Adds updatecerts operation and changes default start behavior for compose recreation. |
| docker-stacks/etc/simva.install.d/simva-env.sh | Adds 11-lrs to stack order and bumps LimeSurvey plugin versions. |
| docker-stacks/etc/simva.install.d/simva-env.dev.sh | Adds local path env var for mounting js-tracker in dev. |
| docker-stacks/etc/simva.d/simva-env.sh | Introduces LRS subdomain and LRS-related default env vars/credentials. |
| docker-stacks/etc/simva.d/simva-env.dev.sh | Adds dev toggles for js-tracker local deployment and sqlite UI subdomain. |
| docker-stacks/data/lrs/.gitignore | Ignores LRS stack runtime marker files in data volume folder. |
| docker-stacks/config-template/traefik/nginx/default.conf.template | Switches Nginx server_name management to a file include. |
| docker-stacks/config-template/limesurvey/etc/config.php | Updates LimeSurvey OAuth2 plugin autocreation configuration structure. |
| docker-stacks/bin/update-certs.sh | Adds a new cert refresh script used by the new updatecerts command. |
| docker-stacks/11-lrs/README.md | Adds pointers to LRSQL OIDC/authority documentation. |
| docker-stacks/11-lrs/etc/simva.d/simva-env.sh | Declares the LRS stack compose file for the stack runner. |
| docker-stacks/11-lrs/etc/hooks/after-start.d/10-wait-lrs-available.sh | Adds post-start availability check for the LRS admin UI. |
| docker-stacks/11-lrs/docker-compose.yml | New LRSQL + Postgres compose stack with Traefik routing. |
| docker-stacks/07-simva/etc/simva.d/simva-env.sh | Improves LimeSurvey version parsing and fixes defaulting for DB check flag. |
| docker-stacks/07-simva/etc/hooks/before-start.d/10-checkout-code.sh | Adjusts migration-related behavior around checkout/build timing. |
| docker-stacks/07-simva/etc/hooks/after-start.d/30-wait-simva-simva-front-available.sh | Adds front availability wait hook (skips during migration). |
| docker-stacks/07-simva/etc/hooks/after-start.d/20-wait-simva-simva-api-available.sh | Adds API health availability wait hook (skips during migration). |
| docker-stacks/07-simva/etc/hooks/after-start.d/10-install-cert.sh | Adds CA cert installation/update inside selected containers after start. |
| docker-stacks/07-simva/etc/hooks/after-start.d/00-wait-container-finished-migration.sh | Adds hook to wait for migration container completion and clean marker files. |
| docker-stacks/07-simva/etc/entrypoint.d/setup-local-deps.js | Adds js-tracker local build/pack/install helper for simva-api container. |
| docker-stacks/07-simva/etc/entrypoint.d/docker-startup-api.sh | Calls the local dependency setup script in development mode. |
| docker-stacks/07-simva/docker-compose.yml | Injects LRS endpoint/credentials into simva-api service env. |
| docker-stacks/07-simva/docker-compose.dev.yml | Simplifies dev mounts and enables local js-tracker workflow. |
| docker-stacks/02-keycloak/etc/hooks/purge.d/01-remove-data-and-config.sh | Fixes .migration purge path to match where migration marker is written. |
| docker-stacks/02-keycloak/etc/hooks/helpers.d/keycloak-functions.sh | Improves admin login/user creation idempotency and normalizes admin username case. |
| docker-stacks/02-keycloak/etc/hooks/before-upgrade.d/upgrade.sh | Adds a pre-upgrade hook to manage migration markers for older Keycloak versions. |
| docker-stacks/02-keycloak/etc/hooks/before-migrate.d/10-remove-simva-realm-data.sh | Removes unnecessary marker file creation during migrate preparation. |
| docker-stacks/02-keycloak/etc/hooks/after-upgrate.d/10-migrate-realm-user-client.sh | Adds an upgrade hook to merge exported realm data with newly generated clients/roles. |
| docker-stacks/01-traefik/etc/hooks/helpers.d/02bis-install-shlink-wildcard-certificate.sh | Adjusts Shlink certificate generation/skip behavior. |
| docker-stacks/01-traefik/etc/hooks/before-start.d/20-nginx.sh | Generates an include file containing server_name lines for dev load balancer Nginx. |
| docker-stacks/01-traefik/etc/hooks/before-start.d/00-check-rootCA.sh | Minor whitespace/style correction. |
| docker-stacks/01-traefik/docker-compose.dev-lb.yml | Updates Nginx template mount to a single template file and mounts generated host include file. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Update LRS service configuration in Docker Compose and add .gitignore for LRS data Update 10-wait-lrs-available.sh Ensure LRS service restarts unless stopped in Docker Compose
…g installation process
…to avoid symlinks
…Auth2 plugin version to 1.6.0
…rays for better structure and clarity
…or improved clarity
…me and update related scripts
…and improve role assignment logic
…file if version is previous to 18.
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
…sh:Target the base /var/lib/postgresql volume so that containers can natively store multiple major versions.
…; specify LRS image and version in environment script
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This pull request introduces several improvements and fixes across the SIMVA stack, focusing on better local development workflows, enhanced Keycloak admin user handling, and improved configuration management. The most significant changes are grouped below by theme.
Local Development & Dependency Management:
js-trackerin thesimva-apicontainer. This includes a newsetup-local-deps.jsscript that builds and installs a local copy ofjs-trackerif enabled, improving developer experience for local package development. (docker-stacks/07-simva/etc/entrypoint.d/setup-local-deps.js,docker-stacks/07-simva/etc/entrypoint.d/docker-startup-api.sh,docker-stacks/07-simva/docker-compose.dev.yml) [1] [2] [3]simva-api,simva-front, andsimva-trace-allocatorservices to use simplified directories, and added environment variables to support the new local dependency workflow. (docker-stacks/07-simva/docker-compose.dev.yml)Keycloak Admin User Handling:
docker-stacks/02-keycloak/etc/hooks/helpers.d/keycloak-functions.sh) [1] [2] [3] [4]docker-stacks/02-keycloak/etc/hooks/before-upgrade.d/upgrade.sh).migrationduring purge to ensure correct cleanup. (docker-stacks/02-keycloak/etc/hooks/purge.d/01-remove-data-and-config.sh)Configuration & Environment Handling:
docker-stacks/07-simva/etc/simva.d/simva-env.sh) [1] [2]simva-apiservice. (docker-stacks/07-simva/docker-compose.yml)Nginx & Traefik Configuration:
docker-stacks/01-traefik/docker-compose.dev-lb.yml,docker-stacks/01-traefik/etc/hooks/before-start.d/20-nginx.sh) [1] [2] [3]docker-stacks/01-traefik/etc/hooks/helpers.d/02bis-install-shlink-wildcard-certificate.sh) [1] [2]Other Fixes:
docker-stacks/02-keycloak/etc/hooks/before-migrate.d/10-remove-simva-realm-data.sh,docker-stacks/07-simva/etc/hooks/before-start.d/10-checkout-code.sh) [1] [2]These changes collectively improve the reliability, maintainability, and developer experience of the SIMVA stack.