-
Notifications
You must be signed in to change notification settings - Fork 64
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
Location for downloading data is inflexible #12
Comments
Yeah I actually have wanted a setting for that for a while. Basically something to use instead of
I'm not sure I understand what you mean by this. If data does not already exist, Tzdata will attempt to download it. Alternatively developers/admins can copy the existing |
Sorry, if it was not understandable, I'll try to explain it in more details, the whole problem and confusion. I'll try to show it on example( https://github.com/liveforeverx/test_app ). Most elixir software, running in production is using We can try to create the test_app and add exrm and tzdata to dependencies of our app. Now, starting shell
We get new priv directory in our app, now, I show the most confusion, that other can get:
And after, we download it, that is the structure
Every production release structure will be damaged with an Next problem is questionable, but good to think about(as I do not have answer for it). If we try for security reasons to split executable data location(where apps, beams are located) with mutable data locations(where for example database files located), which is requirement on most enterprise servers, which I know (May be I know, not so much). If release directory shouldn't be changable, for example, if we make the whole That means 2 consequences:
Can follow me? |
Let's say there is a custom location for mutable tzdata files. For instance |
Yes |
@liveforeverx I have released a new version (0.5.5) where the data directory can be specified in a config file. |
Location, where data saved is hardcoded to
priv
.Problem is, that: https://github.com/lau/tzdata/blob/master/lib/tzdata/data_loader.ex#L13 based on CWD it creates a priv. For example on releases, it seems, like:
release_name/priv/...
not in tzdata/priv, but somewhere starting fromcwd
. That means, on releases, where CWD is changed, it is not really known, where the priv folder should be created.Possible solutions: explicitly define the download directory in configuration (
download_dir: "/tmp/..."
), or use:code.priv_dir
for it. I'm against to usepriv
dir so explicitly for mutable data. Problem is, that it makes impossible to install release on immutable location(at least for a application themself), and configure the whole application to have it mutable data on another storage.The text was updated successfully, but these errors were encountered: