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

Update Hoarder: Improvement .env location (see PR comment for little migration) #1325

Merged
merged 4 commits into from
Jan 13, 2025

Conversation

MahrWe
Copy link
Contributor

@MahrWe MahrWe commented Jan 8, 2025

🛠️ Note:
We are meticulous about merging code into the main branch, so please understand that pull requests not meeting the project's standards may be rejected. It's never personal!
🎮 Note for game-related scripts: These have a lower likelihood of being merged.


✍️ Description

Updated the location of the .env file for hoarder-web.service to be more in line with the hoarder.app (code and documentation).

Background

I misstakenly used hoarder.apps own update script bash hoarder-linux.sh update which expects the .env to be in /etc .

As this results in a very fatal removal of the env-file, I prefer to align these two scripts.

Additional learning: use the update path provided with/ related to the install path.

TODO

migrate existing installations to the new path


Please remove unneeded lines!

  • Related Issue: # (issue number, if applicable)
  • Related PR: # (if applicable)
  • Related Discussion: (if applicable)

🛠️ Type of Change

Please check the relevant options:

  • Bug fix (non-breaking change that resolves an issue)
  • New feature (non-breaking change that adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to change unexpectedly)
  • New script (a fully functional and thoroughly tested script or set of scripts)

✅ Prerequisites

The following steps must be completed for the pull request to be considered:

  • Self-review performed (I have reviewed my code to ensure it follows established patterns and conventions.)
  • Testing performed (I have thoroughly tested my changes and verified expected functionality.)
  • Documentation updated (I have updated any relevant documentation)

📋 Additional Information (optional)

Provide any extra context or screenshots about the feature or fix here.
Hoarder.app documentation relevant to this: https://docs.hoarder.app/Installation/debuntu

@MahrWe MahrWe requested a review from a team as a code owner January 8, 2025 13:42
@github-actions github-actions bot added the update script A change that updates a script label Jan 8, 2025
@michelroegl-brunner michelroegl-brunner changed the title Update .env location for hoarder-web.service Update Script Hoarder: .env location for hoarder-web.service Jan 8, 2025
@MickLesk
Copy link
Member

MickLesk commented Jan 8, 2025

@MohamedBassem is this correct ?

@MickLesk MickLesk added enhancement New feature or request question Further information is requested external This problem is external and removed update script A change that updates a script labels Jan 11, 2025
Copy link
Contributor

@MohamedBassem MohamedBassem left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes. This change looks good to me (except for the typo). I agree that the env files should live in /etc/hoarder rather than /opt/hoarder and that's what we opted into doing in hoarder's own script.

ct/hoarder.sh Outdated Show resolved Hide resolved
Co-authored-by: Mohamed Bassem <[email protected]>
@github-actions github-actions bot added the update script A change that updates a script label Jan 11, 2025
Copy link
Member

@MickLesk MickLesk left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No merge yet, need an Migration Guide as Breaking Change

@MickLesk MickLesk added breaking change A change that is not backward compatible and removed enhancement New feature or request question Further information is requested external This problem is external labels Jan 13, 2025
@MickLesk
Copy link
Member

Migration-Guide if some failing:

  1. change .env into /etc
mkdir -p /etc/hoarder
mv /opt/hoarder/.env /etc/hoarder/hoarder.env
  1. Update your hoarder-services
    /etc/systemd/system/hoarder-workers.service | /etc/systemd/system/hoarder-web.service
Change From: EnvironmentFile=/opt/hoarder/.env
To Following: EnvironmentFile=/etc/hoarder/hoarder.env

@MickLesk MickLesk changed the title Update Script Hoarder: .env location for hoarder-web.service Update Hoarder: .env location for hoarder-web.service (see PR comment for little migration) Jan 13, 2025
@MickLesk MickLesk changed the title Update Hoarder: .env location for hoarder-web.service (see PR comment for little migration) Update Hoarder: Improvement .env location (see PR comment for little migration) Jan 13, 2025
@MickLesk MickLesk merged commit 07c9dc4 into community-scripts:main Jan 13, 2025
5 checks passed
@MahrWe MahrWe deleted the patch-1 branch January 13, 2025 18:00
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
breaking change A change that is not backward compatible update script A change that updates a script
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants