Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add docker image to repo #6

Merged
merged 2 commits into from
Feb 6, 2024
Merged

Add docker image to repo #6

merged 2 commits into from
Feb 6, 2024

Conversation

f-necas
Copy link
Contributor

@f-necas f-necas commented Jan 23, 2024

No description provided.

@f-necas f-necas force-pushed the staging-env branch 3 times, most recently from ecf6f8d to 95e3b44 Compare January 30, 2024 13:34
@f-necas f-necas requested a review from tkohr January 30, 2024 13:40
@f-necas f-necas changed the title feat: prepare CI Add docker image to repo Jan 30, 2024
@f-necas f-necas marked this pull request as ready for review January 30, 2024 13:46
Copy link
Member

@fgravin fgravin left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think we should keep it simple and don't import the complexity of the main Datahub


ARG APP_NAME="search"
ENV APP_NAME=datahub
ENV GN4_API_URL ""
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do we need all this ENV, there used for the generic datahub, but might not be useful for MEL.
I don't even think that we need the config.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Web probably don't need an entrypoint, do we ?

"executor": "nx:run-commands",
"options": {
"commands": [
"nx build datahub",
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

FYI, I've renamed the app to mel-datahub (to be unique) in the last PR that was merged. The name might need to be adapted here after rebase.

@f-necas f-necas force-pushed the staging-env branch 2 times, most recently from caf36a1 to cf29540 Compare February 3, 2024 11:03
# no conf file; use env variables to tweak app config
echo "[INFO] No custom configuration file found at ${CONFIG_OVERRIDE_FILE_PATH}"
# Modify the GN4 url and proxy path based on env variables (if defined)
if [ ! -z "${GN4_API_URL}" ]
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm wondering where we should set the GN4_API_URL.

  • Do we really need a config? Not sure if we already handle reading the config or if we can reuse the gn-ui mechanism, btw.
  • Should we set it via the env var when building the image?
  • Should we set it in the proxy-config.js (which I have changed to localhost for dev and e2e tests).

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

cf my previous comment, I don't think that we need an entrypoint at all.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We will need it for the header &/or custom scripts at less ?

Copy link
Member

@tkohr tkohr Feb 5, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yep @fgravin, I'm still wondering where we should point the prod to the mel backend though, since I've changed the proxy-config.js /geonetwork to point to localhost for the e2e tests. Maybe two different proxy-config.js for production and e2e here?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ok, so I saw a problem where there is none, as the proxy-config.js is not used in prod, but the datahub points to /geonetwork, thanks for the explanation @f-necas !

@f-necas f-necas requested a review from tkohr February 5, 2024 13:43
Copy link
Member

@tkohr tkohr left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks @f-necas ! LGTM now 🙂

@f-necas f-necas merged commit 21719cd into main Feb 6, 2024
7 checks passed
#!/bin/bash

# Executing custom scripts located in CUSTOM_SCRIPTS_DIRECTORY if environment variable is set
if [[ -z "${CUSTOM_SCRIPTS_DIRECTORY}" ]]; then
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What kind of script do you execute from here ?
Add the header for instance ?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

By now, yes, we just add the header.

Copy link
Member

@fgravin fgravin Feb 7, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Couldn't the header be added directly within the application instead ?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It could and would be better but should be another ticket.

@fgravin fgravin deleted the staging-env branch February 7, 2024 09:44
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants