Skip to content

Commit

Permalink
Merge pull request #224 from microbiomedata/222-orcid-login-no-longer…
Browse files Browse the repository at this point in the history
…-works-jetstream2

Use `ORCID_CLIENT_ID` variable when building React app
  • Loading branch information
eecavanna authored Jul 3, 2024
2 parents 7bcee5b + 4302dcb commit 30df203
Show file tree
Hide file tree
Showing 4 changed files with 25 additions and 1 deletion.
5 changes: 4 additions & 1 deletion .github/workflows/build-and-push-image.yml
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,10 @@ jobs:
# exist within the container image.
build-args: |
NMDC_EDGE_WEB_APP_VERSION=${{ github.ref_name }}
REACT_APP_IS_ORCID_AUTH_ENABLED=true
REACT_APP_ORCID_CLIENT_ID=${{ vars.ORCID_CLIENT_ID }}
# References:
# - https://docs.github.com/en/actions/learn-github-actions/variables#using-the-vars-context-to-access-configuration-variable-values
# - https://docs.github.com/en/actions/publishing-packages/publishing-docker-images#publishing-images-to-github-packages
# - https://github.com/microbiomedata/nmdc-aggregator/blob/main/.github/workflows/build-and-push-image.yml
# - https://github.com/microbiomedata/nmdc-aggregator/blob/main/.github/workflows/build-and-push-image.yml
7 changes: 7 additions & 0 deletions webapp-node16.Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,13 @@ LABEL org.opencontainers.image.source="https://github.com/microbiomedata/nmdc-ed
ARG NMDC_EDGE_WEB_APP_VERSION
ENV NMDC_EDGE_WEB_APP_VERSION="$NMDC_EDGE_WEB_APP_VERSION"

# Create ORCID-related environment variables Node.js will consume while building the React app.
ARG IS_ORCID_AUTH_ENABLED
ENV REACT_APP_IS_ORCID_AUTH_ENABLED="$IS_ORCID_AUTH_ENABLED"

ARG ORCID_CLIENT_ID
ENV REACT_APP_ORCID_CLIENT_ID="$ORCID_CLIENT_ID"

# Allow the developer to (optionally) customize the ID and name of the user by which PM2 will
# be launched; and the ID and name of the group to which that user will belong.
ARG USER_ID=60005
Expand Down
7 changes: 7 additions & 0 deletions webapp-node18.Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,13 @@ LABEL org.opencontainers.image.source="https://github.com/microbiomedata/nmdc-ed
ARG NMDC_EDGE_WEB_APP_VERSION
ENV NMDC_EDGE_WEB_APP_VERSION="$NMDC_EDGE_WEB_APP_VERSION"

# Create ORCID-related environment variables Node.js will consume while building the React app.
ARG IS_ORCID_AUTH_ENABLED
ENV REACT_APP_IS_ORCID_AUTH_ENABLED="$IS_ORCID_AUTH_ENABLED"

ARG ORCID_CLIENT_ID
ENV REACT_APP_ORCID_CLIENT_ID="$ORCID_CLIENT_ID"

# Allow the developer to (optionally) customize the ID and name of the user by which PM2 will
# be launched; and the ID and name of the group to which that user will belong.
ARG USER_ID=60005
Expand Down
7 changes: 7 additions & 0 deletions webapp-node20.Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,13 @@ LABEL org.opencontainers.image.source="https://github.com/microbiomedata/nmdc-ed
ARG NMDC_EDGE_WEB_APP_VERSION
ENV NMDC_EDGE_WEB_APP_VERSION="$NMDC_EDGE_WEB_APP_VERSION"

# Create ORCID-related environment variables Node.js will consume while building the React app.
ARG IS_ORCID_AUTH_ENABLED
ENV REACT_APP_IS_ORCID_AUTH_ENABLED="$IS_ORCID_AUTH_ENABLED"

ARG ORCID_CLIENT_ID
ENV REACT_APP_ORCID_CLIENT_ID="$ORCID_CLIENT_ID"

# Allow the developer to (optionally) customize the ID and name of the user by which PM2 will
# be launched; and the ID and name of the group to which that user will belong.
ARG USER_ID=60005
Expand Down

0 comments on commit 30df203

Please sign in to comment.