How to pass environment variables to Docker Hop Server instead of using env.json? #5684
Replies: 5 comments 2 replies
-
Hi Pierre, I do something like that from Apache airflow to pass parameters I'm not sure but HOP_RUN_PARAMETER do not set environnement variable for me or only one and she is split to create paramaters for hop run |
Beta Was this translation helpful? Give feedback.
-
Do the parameters you pass through HOP_RUN_PARAMETER have to be defined as input parameters for the Workflow? |
Beta Was this translation helpful? Give feedback.
-
Why don't you just set an environmental variable in your docker-file? |
Beta Was this translation helpful? Give feedback.
-
Maybe I’m configuring this incorrectly, but the configuration of variables used by the Hop server is set in an environment variables file (a JSON file). My problem is how to transfer the variables from the host into this environment variables file inside the container. Perhaps my assumption is wrong, and I don’t need to use the file at all. How should this be done then? |
Beta Was this translation helpful? Give feedback.
-
Depends on how you are using the Hop server. |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
I am running Hop Server in a Docker container to execute workflows and pipelines through the REST API.
Currently, I provide environment variable configuration by mounting a parameter file project-docker-env.json.
I would like to configure these variables directly through system environment variables instead.
I tried setting the HOP_RUN_PARAMETERS parameter like this:
HOP_RUN_PARAMETERS=PG_in1_hostname=host.docker.internal,PG_in1_port=5432,PG_in1_username=postgres
Unfortunately, when I start a process on Hop Server, the declared variables are not recognized, and I get errors such as
src_tab.0 - Unable to parse URL jdbc:postgresql://${PG_in1_hostname}:${PG_in1_port}/${PG_in1_database}
How can I correctly pass such settings to Hop Server?
volumes:
- ./logs:/files/logs
- ./docker-env.json:/files/config/projects/HOPTranslation/project-docker-env.json
environment:
- HOP_ENVIRONMENT_NAME=HT_Prod
- HOP_ENVIRONMENT_CONFIG_FILE_NAME_PATHS=/files/config/projects/HOPTranslation/project-docker-env.json
Beta Was this translation helpful? Give feedback.
All reactions