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

Setup Docker multi-stage builds for env runtime changes #433

Open
3 tasks
surchs opened this issue Jan 10, 2025 · 5 comments · May be fixed by #450
Open
3 tasks

Setup Docker multi-stage builds for env runtime changes #433

surchs opened this issue Jan 10, 2025 · 5 comments · May be fixed by #450
Assignees
Labels
usability Issue affecting user or developer experience.

Comments

@surchs
Copy link
Contributor

surchs commented Jan 10, 2025

For external deployments that might want GDPR compliant usage statistics (e.g. the BIC node) we should allow a way to define things like the plausible script to be added at runtime (i.e. after the image is built).

Similar to how we add ours in

- name: Add prod scripts
run: |
add_script='<script async src="https://w.appzi.io/w.js?token=YVTHd"></script><script defer data-domain="query.neurobagel.org" src="https://plausible.neurobagel.org/js/script.js"></script>'
# Need to use single quotes around sed to avoid ! to be interpreted as a history expansion character
sed -i 's|<!-- Additional script tags -->|'"${add_script}"'|' index.html

TODO:

  • Investigate a process to search-replace specific place-holder strings after the app is built
  • Add a custom entrypoint that does the search-replace work
  • Once this works, see if we can reuse it to replace the need to build the tool every time to read the .env files
@surchs surchs added flag:schedule Flag issue that should go on the roadmap or backlog. usability Issue affecting user or developer experience. labels Jan 10, 2025
@surchs surchs moved this to Backlog in Neurobagel Jan 21, 2025
@surchs surchs moved this from Backlog to Specify - Active in Neurobagel Jan 21, 2025
@surchs surchs moved this from Specify - Active to Specify - Done in Neurobagel Jan 21, 2025
@alyssadai alyssadai removed the flag:schedule Flag issue that should go on the roadmap or backlog. label Jan 22, 2025
@surchs surchs moved this from Specify - Done to Specify - Active in Neurobagel Jan 22, 2025
@surchs
Copy link
Contributor Author

surchs commented Jan 22, 2025

need to decide if we split off the part about the build process in entrypoints

@surchs
Copy link
Contributor Author

surchs commented Jan 24, 2025

@rmanaem didn't you say you had worked on this issue already? Is there a branch or PR I should look at?

@surchs surchs moved this from Specify - Active to Implement - Active in Neurobagel Jan 24, 2025
@surchs surchs self-assigned this Jan 24, 2025
@surchs surchs moved this from Implement - Active to Specify - Active in Neurobagel Jan 24, 2025
@surchs
Copy link
Contributor Author

surchs commented Jan 24, 2025

Moving back to specify so we can turn it into the multi-stage build process issue

@rmanaem
Copy link
Contributor

rmanaem commented Jan 24, 2025

@surchs

didn't you say you had worked on this issue already? Is there a branch or PR I should look at?

Yea, I'm gonna push my changes and draft a PR.

@rmanaem
Copy link
Contributor

rmanaem commented Jan 24, 2025

@surchs see #450

@surchs surchs changed the title Enable custom plausible link Setup Docker multi-stage builds for env runtime changes Jan 24, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
usability Issue affecting user or developer experience.
Projects
Status: Specify - Active
3 participants