-
Notifications
You must be signed in to change notification settings - Fork 3
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
[ENH] Enabled possiblity of injecting custom plausible link to the docker container at runtime #450
base: main
Are you sure you want to change the base?
Conversation
Reviewer's Guide by SourceryThis pull request enables the injection of a custom Plausible Analytics script into the Docker container at runtime. This is achieved by adding environment variables for the Plausible domain and source, and using a shell script to inject the script into the index.html file during container startup. Sequence diagram for Docker container startup with Plausible script injectionsequenceDiagram
participant Container as Docker Container
participant Entrypoint as entrypoint.sh
participant HTML as index.html
Container->>Entrypoint: Start container with PLAUSIBLE_DOMAIN and PLAUSIBLE_SRC
activate Entrypoint
alt Environment variables present
Entrypoint->>HTML: Read index.html
Entrypoint->>HTML: Inject Plausible script using sed
end
Entrypoint->>Container: Execute nginx
deactivate Entrypoint
File-Level Changes
Assessment against linked issues
Possibly linked issues
Tips and commandsInteracting with Sourcery
Customizing Your ExperienceAccess your dashboard to:
Getting Help
|
✅ Deploy Preview for neurobagel-query ready!
To edit notification comments on pull requests, go to your Netlify site configuration. |
Changes proposed in this pull request:
NOTE: If this pull request is to be released, the release label must be applied once the review process is done to avoid the local and remote from going out of sync as a consequence of the
bump version
workflow runChecklist
This section is for the PR reviewer
[ENH]
,[FIX]
,[REF]
,[TST]
,[CI]
,[MNT]
,[INF]
,[MODEL]
,[DOC]
) (see our Contributing Guidelines for more info)skip-release
(to be applied by maintainers only)Closes #XXXX
query-tool-results
files in the neurobagel_examples repo have been regeneratedFor new features:
For bug fixes:
Summary by Sourcery
Switch the base image to
node:20-alpine
and copy the built files to annginx:alpine
image. Inject a custom plausible link to the docker container at runtime using environment variables.Build:
Deployment:
PLAUSIBLE_DOMAIN
andPLAUSIBLE_SRC
environment variables are set.