All checks were successful
Publish FaceAI Container / publish (push) Successful in 6m52s
- Updated Dockerfile to include default MySQL client for better database interaction. - Modified entrypoint.sh to support additional workspace for legacy applications and added MySQL readiness check before startup. - Enhanced PowerShell script for trimming MySQL dumps to include overlay dumps and improved error handling for missing race and user IDs. - Added new image files and face encoding pickles for various projects, ensuring comprehensive data availability. - Removed outdated face encoding pickle from PISA directory to maintain data relevance. Co-authored-by: Copilot <copilot@github.com>
58 lines
No EOL
2.5 KiB
Markdown
58 lines
No EOL
2.5 KiB
Markdown
# Local JSP Docker Stack
|
|
|
|
This stack boots the `www` Tomcat webapp locally, seeds MySQL from the checked-in `pg` dump, overrides environment-sensitive `PARM` rows, and captures outgoing email into files.
|
|
|
|
The default local model seed is `db/pg-local-purpose-seed-20260422.sql`.
|
|
|
|
## Services
|
|
|
|
- `tomcat-www`: Tomcat 9 on Java 11 serving a runtime copy of `www`
|
|
- `mysql`: MySQL 8 with first-boot import of `db/pg-local-purpose-seed-20260422.sql` by default
|
|
- `maildump`: local SMTP sink writing `.eml`, `.txt`, and `.html` payloads to disk
|
|
|
|
## What Gets Mocked
|
|
|
|
- `PARM.DOCBASE` points to `/data/docbase/`
|
|
- temp, help, and mailer paths are redirected under `/data/docbase/`
|
|
- SMTP points to the local `maildump` service
|
|
- common external-storage style paths are mapped to local fixture directories from `test_pkl`
|
|
|
|
## Start
|
|
|
|
From this folder:
|
|
|
|
```powershell
|
|
docker compose up --build
|
|
```
|
|
|
|
The public site is exposed on `http://localhost:8080`.
|
|
|
|
Mail output is written under `local-jsp-docker/runtime/maildump/out`.
|
|
|
|
## First Boot
|
|
|
|
The first MySQL start imports the file named by `LOCAL_DB_SEED_DUMP`, which defaults to `db/pg-local-purpose-seed-20260422.sql`.
|
|
|
|
After the import finishes, the local override script updates `PARM` with local-safe values and forces a deterministic legacy login for local testing.
|
|
|
|
The default local test credential is `test` / `test1`. Override it with `LOCAL_TEST_USER_LOGIN`, `LOCAL_TEST_USER_PASSWORD`, and `LOCAL_TEST_USER_EMAIL` if needed.
|
|
|
|
The local MySQL container initializes with `lower_case_table_names=1` because the legacy app issues uppercase table names such as `PARM` on Linux. If you change this setting or are coming from an older volume, rebuild from a fresh volume with `docker compose down -v` before starting again.
|
|
|
|
The Tomcat runtime patches the deployed `WEB-INF/web.xml` from `LOCAL_APP_INSTANCE`, which now defaults to `main` so the legacy startup initialization path runs locally as it does on the site. You can still override `LOCAL_APP_INSTANCE` when you need to suppress that startup path for a targeted debug session.
|
|
|
|
## Restart Workflow
|
|
|
|
JSP edits are picked up by restarting `tomcat-www`:
|
|
|
|
```powershell
|
|
docker compose restart tomcat-www
|
|
```
|
|
|
|
The Tomcat container copies `www` into a runtime directory on each start, patches the deployed `WEB-INF/web.xml`, and then runs Tomcat.
|
|
|
|
## Notes
|
|
|
|
- This stack currently targets the `www` runtime only.
|
|
- PHP files in `www` are not executed by this stack.
|
|
- If the app still references production-only paths from DB data, add them to `mysql/init/20-local-overrides.sh` and `tomcat/bootstrap-docbase.sh`. |