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

Migrate default database path from /media/frigate to /config #5219

Merged
merged 8 commits into from
Apr 23, 2023

Conversation

felipecrs
Copy link
Contributor

@felipecrs felipecrs commented Jan 24, 2023

@netlify
Copy link

netlify bot commented Jan 24, 2023

Deploy Preview for frigate-docs canceled.

Name Link
🔨 Latest commit 76fe2a1
🔍 Latest deploy log https://app.netlify.com/sites/frigate-docs/deploys/64455991fcb2430007f045fe

@felipecrs
Copy link
Contributor Author

felipecrs commented Jan 24, 2023

@NickM-27 this is working for me. Feel free to take an early look on it, if you want.

@NickM-27
Copy link
Sponsor Collaborator

You'll probably also want to update the config to point to the new location by default

@felipecrs
Copy link
Contributor Author

lol that's the most important part. Thank you.

@felipecrs felipecrs changed the title [WIP] Migrate db path to /config Migrate default database path from /media/frigate to /config Jan 29, 2023
@felipecrs felipecrs marked this pull request as ready for review January 29, 2023 14:50
@bagobones
Copy link

Wouldn't /config/db make more sense (as the db is made up of several files)? Not sure if this would impact the docker mappings or not.. Some might want the ability to separate the config file and where the DB is stored if they have particularly huge setups or for backup reasons.

@NickM-27
Copy link
Sponsor Collaborator

Some might want the ability to separate the config file and where the DB is stored if they have particularly huge setups or for backup reasons.

This is already possible with frigate. This PR simply changes the default location.

@blakeblackshear
Copy link
Owner

can we get this rebased? I am ready to merge this.

@felipecrs
Copy link
Contributor Author

Sure, I'll work on it.

@felipecrs felipecrs changed the title Migrate default database path from /media/frigate to /config Migrate default database path from /media/frigate to /config Apr 23, 2023
@felipecrs
Copy link
Contributor Author

@blakeblackshear done.

@felipecrs
Copy link
Contributor Author

felipecrs commented Apr 23, 2023

Just to remind, we should remove the following line for the add-on by the time we release the next beta:

https://github.com/blakeblackshear/frigate-hass-addons/blob/5e67db091d07b37fe004c904b47eafe8d6bbaf12/frigate/config.yaml#L51-L52

@NickM-27
Copy link
Sponsor Collaborator

Just to remind, we should remove the following line for the add-on by the time we release the next beta:

https://github.com/blakeblackshear/frigate-hass-addons/blob/5e67db091d07b37fe004c904b47eafe8d6bbaf12/frigate/config.yaml#L51-L52

what's the reasoning for that?

@blakeblackshear blakeblackshear merged commit cdd8e6f into blakeblackshear:dev Apr 23, 2023
@felipecrs felipecrs deleted the migrate-db-path branch April 23, 2023 16:38
@felipecrs
Copy link
Contributor Author

what's the reasoning for that?

Actually it's not mandatory, it's just superfluous to have it set.

@NickM-27
Copy link
Sponsor Collaborator

what's the reasoning for that?

Actually it's not mandatory, it's just superfluous to have it set.

I don't think that is correct. The file in addon is supposed to be called frigate.yml but by default frigate always looks for config.yml. The only way the addon knows to look for frigate.yml is because of this variable

@felipecrs
Copy link
Contributor Author

Oh, that's right. Never mind, my bad!

@NickM-27
Copy link
Sponsor Collaborator

this isn't working for me, it is exiting saying that the config file can not be found, but it is located at /config/config.yaml

@NickM-27
Copy link
Sponsor Collaborator

I think the substitution was mixed up, will put up a PR to fix

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Should not we store the database file in /data by default?
4 participants