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

static_files as an env variable is not good for releases #26

Closed
elbrujohalcon opened this issue Oct 15, 2015 · 3 comments
Closed

static_files as an env variable is not good for releases #26

elbrujohalcon opened this issue Oct 15, 2015 · 3 comments
Labels

Comments

@elbrujohalcon
Copy link
Member

Files in releases are placed under lib/cowboy_swagger-…/….
The proper way to find that path would be:

filename:join(code:priv_dir(cowboy_swagger), "swagger")
@cabol
Copy link
Contributor

cabol commented Nov 26, 2015

@elbrujohalcon we should discuss about this issue, if you take a look at the example code, there isn't any hack in code, the release was solved modifying the relx.config in order to copy the priv/swagger folder located in cowboy-swagger, to the priv directory of the app using cowboy-swagger. Check it out: https://github.com/inaka/cowboy-swagger/blob/master/example/relx.config#L7. I stay tuned.

@harenson
Copy link
Member

@elbrujohalcon I tested it modifying the relx.config of serpents and it worked like a charm.

@elbrujohalcon
Copy link
Member Author

@harenson @cabol that works, but you're forcing your users to modify their relx.config just to get swagger working in the first place. I would rather not require any special configuration from the user to get this library to just work. If the users want to apply his patches to the assets, then they can set the static_files environment parameter in their configuration. If they don't, cowboy swagger just automagically works. 🌟

harenson added a commit that referenced this issue Nov 26, 2015
elbrujohalcon pushed a commit that referenced this issue Nov 27, 2015
…variable-is-not-good-for-releases

[Fix #26] Fix static_files trail
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants