mattcasters commented on issue #2596:
URL: https://github.com/apache/hop/issues/2596#issuecomment-5015371946

   ## Parent project support in the Docker basic image
   
   Implemented one-level parent project registration for the official Hop 
Docker / Hop Web images so a child project can inherit parent metadata when 
both homes are mounted.
   
   ### Root cause
   The entrypoint only registered `HOP_PROJECT_NAME` / `HOP_PROJECT_FOLDER`. 
Parent inheritance in `Project.modifyVariables` looks up the parent in 
`hop-config`; if the parent is not registered, its `metadataBaseFolder` is 
never merged into `HOP_METADATA_FOLDER`.
   
   ### Changes
   - **`load-and-execute.sh` / `run-web.sh`**: register the parent project 
first (when configured), then the main project with `--project-parent` and 
`--project-keep-config-file`.
   - **New environment variables**:
     - `HOP_PARENT_PROJECT_NAME`
     - `HOP_PARENT_PROJECT_FOLDER`
     - `HOP_PARENT_PROJECT_CONFIG_FILE_NAME` (default: `project-config.json`)
   - **`hop-conf` project-create**: if an existing `project-config.json` 
already defines `parentProjectName`, that value is kept instead of always 
forcing the standard parent (unless `--project-parent` is set).
   - **Docs**: docker container tech manual + hop-web env table, including a 
parent-project example.
   
   ### Scope
   Only **one parent level** is supported via these env vars (as discussed). 
Deeper chains would need a follow-up.
   
   ### Related
   Works together with #2331 (`PARENT_PROJECT_HOME` / `PARENT_PROJECT_NAME`) so 
paths and long-lived setups can reference the parent home after the parent is 
registered.
   
   ### Example
   ```bash
   docker run --rm \
     -v /host/projects:/files/projects \
     --env HOP_FILE_PATH='jobs/load_projectB_data.hwf' \
     --env HOP_PROJECT_FOLDER=/files/projects/projectB \
     --env HOP_PROJECT_NAME=projectB \
     --env HOP_PARENT_PROJECT_FOLDER=/files/projects/projectA \
     --env HOP_PARENT_PROJECT_NAME=projectA \
     --env HOP_ENVIRONMENT_NAME=prod_docker_exec \
     --env 
HOP_ENVIRONMENT_CONFIG_FILE_NAME_PATHS=/files/projects/projectB/prod_docker_exec-config.json
 \
     --env HOP_RUN_CONFIG=docker_run_config \
     apache/hop:<tag>
   ```
   
   `HOP_PARENT_PROJECT_NAME` should match `parentProjectName` in the child 
project’s `project-config.json`.
   
   Commit on branch `eil-friction`: `3830b5f8af` (*Issue #2596 : add parent 
project support to Docker basic image*).


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to