Skip to content

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

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

Houwie7000 wants to merge 38 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

Ticket:

Run the full stack in Docker:

  • a seeded ILG DB
  • a live mode simulator
  • the node application
  • the tests

Add documentation.

Code:

  • Dockerfile - new multi-stage with development, test and simul targets. Deps are installed in their own stage for caching. Chromium is installed only in test and all imags run as a non-root user.
  • Compose - a base file plus override files for the app, database, and the simulator. Dev and test use different project names so they can run at the same time and not interfere.
  • Seeding - scripts that apply the schema and insert example messages.
  • Tests - scratch JSON DBs are now written to os.tmpdir()
  • Docs - how to run the stack and the tests in Docker

Reviewer:

  • Messages are re-seeded on every 'up' with fresh timestamps so that a '-1d' filter returns results right away.

@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.
@isaachilly
isaachilly self-requested a review as a code owner October 13, 2026 12:26

This branch has not been deployed

No deployments
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