Skip to content

[OGUI-1586] ILG Docker Compose support - #2710

Open
Houwie7000 wants to merge 31 commits into
devfrom
feature/Houwie7000/OGUI-1586/docker-compose-ILG
Open

[OGUI-1586] ILG Docker Compose support#2710
Houwie7000 wants to merge 31 commits into
devfrom
feature/Houwie7000/OGUI-1586/docker-compose-ILG

Conversation

@Houwie7000

@Houwie7000 Houwie7000 commented Jan 6, 2025

Copy link
Copy Markdown
Contributor

I have JIRA issue created

  • branch and/or PR name(s) includes JIRA ID
  • issue has "Fix version" assigned
  • issue "Status" is set to "In review"
  • PR labels are selected
  • FLP integration tests were ran successful

Dockerfile - multi-stage: development, test, simul. Deps cached in their own
stage, Chromium only in test (dev image ~500MB), runs as non-root.

Compose - base file plus overrides for the app, MariaDB, and the simulator, so the DB
and simulator only start when asked for. Dev and test use separate project names.

Seeding - schema applied once on volume creation; re-seeds messages on every 'up' so a '-1d' filter shows results immediately.

Shutdown - simulator handle SIGTERM/SIGINT/SIGHUP.

Tests - scratch JSON DBs now go to os.tmpdir() instead of the repo.

@isaachilly isaachilly self-assigned this Aug 7, 2026
@isaachilly
isaachilly marked this pull request as draft August 7, 2026 17:00
Adds NODE_ENV to docker-compose for simulator.
It is best to run node directly when possible to allow signals to pass.
Track connected clients and close them when the simulator shuts down.

Previously, if the simulator was closed before the application, it would hang for a period due to orphaned client connections. Now the server explicitly destroys all connected clients during shutdown, ensuring clean termination whether the simulator runs standalone or in conjunction with the app.
Only the test suite drives a browser, moving the `apk add chromium` takes development from 1.45GB to 430MB.

Also corrects the download-skip variable. Pup 25 reads only `PUPPETEER_SKIP_DOWNLOAD`.

`freetype` is already a transitive dependency of `chromium`
Split package*.json up to allow better caching.
Rewrite README to reflect changes.

Copy `package.json` and `package-lock.json` by name so a missing file fails the build.

Remove an unused `COPY` from simulator, move copy comment.
`npm run docker:test` did not start a second stack, it recreated the running dev container which is not useful when constantly rerunning tests while developing.

Set the name in each override file and rewrite the `docker:cleanup` command to run down per project.
- Split database and simulator services out of docker-compose.dev.yaml into dedicated override files (docker-compose.dev.db.yaml and docker-compose.dev.ilg.yaml), replacing the previous Compose profiles approach
- Add a one-shot `seeder` service that inserts or re-dates fake messages on every `up`, keeping query-mode data always within the last 2 days
- Add test/db/INFOLOGGER.sql (clean schema, no partitioning for local dev) and test/db/seed-messages.js
- Move fakeData.json to test/fake-data/ and utils.js to test/utils/ so both the live-simulator and seeder can share them
- Update Dockerfile simul stage to copy the new shared directories
- Fix mocha teardown to await closeServer
Change npm command, fix ESLint ignores and update README
@isaachilly
isaachilly marked this pull request as ready for review August 19, 2026 16:43
Add a dedicated `seeder` stage so dependencies are enforced and if unsatisified fail the build. It uses the already cached dev deps.

Move `INFOLOGGER.sql` and `seed-messages.js` out of test into a dedicated `docker/` dir and mount the whole dir so stale inodes are not an issue.

Give MariaDB a named volume so `down -v` is the explicit way to reset the schema.

Widen `.dockerignore` to allow `docker/` and adjust `eslint.config.js` to not scan the db files.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Development

Successfully merging this pull request may close these issues.

2 participants