WIP: feat(docker): Add ability to substitute env vars with _file vars #1621

Draft
donor_extortion wants to merge 2 commits from donor_extortion/api:feature/docker-env-file into main
First-time contributor

Allows usage of _FILE env vars for docker as mentioned in #704. Uses the solution linked in the comments minus the bash-isms (wasn't sure if you wanted to add bash to the image). Instead of manually specifying individual vars, it loops over all env vars checking if they start with VIKUNJA and end with _FILE.

Also wasn't sure if the docs should be in the main config page where it explains env var usage or if it should go in one of the docker specific pages.

Resolves #704

Allows usage of `_FILE` env vars for docker as mentioned in #704. Uses the solution linked in the comments minus the bash-isms (wasn't sure if you wanted to add bash to the image). Instead of manually specifying individual vars, it loops over all env vars checking if they start with `VIKUNJA` and end with `_FILE`. Also wasn't sure if the docs should be in the main config page where it explains env var usage or if it should go in one of the docker specific pages. Resolves #704
donor_extortion added 2 commits 2023-10-14 04:01:32 +00:00
konrad reviewed 2023-10-17 16:18:40 +00:00
konrad left a comment
Owner

Thanks for the PR!

I kind of hate to say this, but could you change it so that the file loading logic is happening directly in Vikunja and not in the entrypoint only? That would allow using this in native installations in e.g. nixos as well which do not use docker.

Thanks for the PR! I kind of hate to say this, but could you change it so that the file loading logic is happening directly in Vikunja and not in the entrypoint only? That would allow using this in native installations in e.g. nixos as well which do not use docker.
donor_extortion changed title from feat(docker): Add ability to substitute env vars with _file vars to WIP: feat(docker): Add ability to substitute env vars with _file vars 2023-10-18 19:44:19 +00:00
donor_extortion changed title from WIP: feat(docker): Add ability to substitute env vars with _file vars to WIP: feat(docker): Add ability to substitute env vars with _file vars 2023-10-18 19:44:24 +00:00
Owner

Hey @donor_extortion are you still interested in this?

Hey @donor_extortion are you still interested in this?
Author
First-time contributor

I got distracted by other things and completely forgot about this. I am still interested, though, it's unlikely I'd be able to work on it any time soon.

I got distracted by other things and completely forgot about this. I am still interested, though, it's unlikely I'd be able to work on it any time soon.
All checks were successful
continuous-integration/drone/pr Build is passing
Required
Details
This pull request has changes conflicting with the target branch.
  • docker/entrypoint.sh
Sign in to join this conversation.
No reviewers
No Milestone
No Assignees
2 Participants
Notifications
Due Date
The due date is invalid or out of range. Please use the format 'yyyy-mm-dd'.

No due date set.

Dependencies

No dependencies set.

Reference: vikunja/vikunja#1621
No description provided.