Skip to content

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

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

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

@Houwie7000
Houwie7000 requested a review from graduta as a code owner January 6, 2025 16:59
@isaachilly isaachilly self-assigned this Aug 7, 2026
@isaachilly
isaachilly marked this pull request as draft August 7, 2026 17:00
@isaachilly
isaachilly marked this pull request as ready for review August 19, 2026 16:43
@isaachilly
isaachilly self-requested a review as a code owner October 13, 2026 12:26
@isaachilly
isaachilly added this pull request to stack #3734 November 11, 2026 16:56
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
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 force-pushed the feature/Houwie7000/OGUI-1586/docker-compose-ILG branch from 0888246 to 968b154 Compare November 11, 2026 18:58

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