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

Bugfix: Reading environment from files didn't work for management commands #2261

Merged
merged 1 commit into from Dec 31, 2022

Conversation

stumpylog
Copy link
Member

Proposed change

When reading files to populate environment variables, the exported variables aren't available when running a management command, as that's a different shell.

Refactors the reading of files to populate environment into a seperate script, which is then used in the docker startup and the management command.

Also expands the script to use anything ending in _FILE, meaning all environment can be set via a file if one desires.

Fixes #2248

Type of change

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • Other (please explain)

Checklist:

  • I have read & agree with the contributing guidelines.
  • If applicable, I have tested my code for new features & regressions on both mobile & desktop devices, using the latest version of major browsers.
  • If applicable, I have checked that all tests pass, see documentation.
  • I have run all pre-commit hooks, see documentation.
  • I have made corresponding changes to the documentation as needed.
  • I have checked my modifications for any breaking changes.

@stumpylog stumpylog requested a review from a team as a code owner December 29, 2022 23:47
@paperless-ngx-secretary paperless-ngx-secretary bot added the non-trivial Requires approval by several team members label Dec 29, 2022
@github-actions github-actions bot added the bug Bug report or a Bug-fix label Dec 29, 2022
@shamoon
Copy link
Member

shamoon commented Dec 30, 2022

Cool, love how it’ll be used in both places

@shamoon shamoon merged commit c76460b into dev Dec 31, 2022
@shamoon shamoon deleted the fix/2248-file-env-stuff branch December 31, 2022 16:22
@github-actions
Copy link
Contributor

This pull request has been automatically locked since there has not been any recent activity after it was closed. Please open a new discussion or issue for related concerns.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Apr 17, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug Bug report or a Bug-fix non-trivial Requires approval by several team members
Projects
Archived in project
Development

Successfully merging this pull request may close these issues.

Bug? Getting "password authentication failed for user paperless" when running "document_retagger -t"
2 participants