Navigation Menu

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

[enhancement] create cache directory if it doesn't exist #127

Closed
onedr0p opened this issue Mar 22, 2021 · 2 comments
Closed

[enhancement] create cache directory if it doesn't exist #127

onedr0p opened this issue Mar 22, 2021 · 2 comments

Comments

@onedr0p
Copy link
Contributor

onedr0p commented Mar 22, 2021

I would like Gonic to create the cache directory if it doesn't exist

2021/03/22 19:05:33 starting gonic v0.12.2
2021/03/22 19:05:33 provided config
2021/03/22 19:05:33     cache-path      /data/cache
2021/03/22 19:05:33     config-path
2021/03/22 19:05:33     db-path         /data/gonic.db
2021/03/22 19:05:33     genre-split

2021/03/22 19:05:33     jukebox-enabled false
2021/03/22 19:05:33     listen-addr     :80
2021/03/22 19:05:33     music-path      /media-serenity/Library/Music
2021/03/22 19:05:33     podcast-path    /media-serenity/Library/Podcasts
2021/03/22 19:05:33     proxy-prefix
2021/03/22 19:05:33     scan-interval   120
2021/03/22 19:05:33     version         false
2021/03/22 19:05:33 please provide a valid cache directory

For now I have to use an initContainer to create the directory before the container starts

https://github.com/onedr0p/home-cluster/blob/b53508c551e28190b7914866a640e5ce3c530695/cluster/media/gonic/helm-release.yaml#L20

@sentriz
Copy link
Owner

sentriz commented Mar 23, 2021

hey,
not sure if this is a kubernetes thing,
but gonic has no logic for creating any of the root folders it's expecting (eg cache, music, podcasts)

at least in dockerland, when provide host->container mounts docker creates the host folders for you (in this example the /tmp/g_* folders didn't exist)

perhaps there is a similar way in kubernetes?
image

@onedr0p
Copy link
Contributor Author

onedr0p commented Mar 24, 2021

👋 No problem, I have it solved as I mentioned above.

I'm trying to put the cache directory under /data. However when the application is first created /data/cache does not exist. Putting the cache directory here makes it much easier to maintain because I'll only need 1 gonic app volume for everything besides the media share.

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

No branches or pull requests

2 participants