-
Notifications
You must be signed in to change notification settings - Fork 71
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
Deploying with releases #76
Comments
Some additional details here: With |
@brortao You are going to need to add your app's name to the list of apps to start, since the Regarding the |
Hmm, yes, running the task locally does create the index. It's just on my deployed service. I'm guessing this is a problem with my infrastructure so I'll close this and continue there! |
Ah, hang on, reopening. It's failing because it cannot find the index config JSON file. That's why it was working on my local machine: when I run it from my project folder, it works; when I run it from elsewhere I get an enoent error. I think the problem is in Here are the results of
The index configuration is hidden in a subfolder:
I've tried to create an index from this file, but there isn't a neat solution:
|
I opened a thread on the Elixir forums to find out if there's a good way to access files in |
@brortao you can simply use It would really help to simplify deployments if it would be possible to put index-settings.json files into the priv folder. :-) |
@pixelvitamina yeah, those work at runtime, but as far as I can tell this library needs the path during configuration at compile-time. You can't use those functions in e.g config.exs. Since you can't pass the settings file directory to
|
@brortao You can add a runtime configuration by overriding |
Amazing, I didn't realize this. Thank you! |
Arrived a little late to the conversation. If anyone is interested this is what I used to make the indexes work on a release:
|
Elixir 1.9's releases are a built-in replacement for Distillery. Like Distillery, you can't run Mix tasks against a release.
I tried following the deployment guide in the docs but run into an error:
This is the release module that I'm running:
If I replace the contents of
start_services()
with a single line that callsApplication.ensure_all_started(@app)
then things work fine, but this starts my entire app which I'd prefer to avoid.Does anyone know if there's a major difference between Distillery and Elixir releases that could be causing this? It seems like
Enum.each(@clusters, & &1.start_link())
is not starting the cluster as it should.The text was updated successfully, but these errors were encountered: