-
Notifications
You must be signed in to change notification settings - Fork 15
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
Crashing container when no bower.json file exists. #8
Comments
hey @mtheadley this is really interesting. can you please provide more details on that. Create a
and attach all logs on failed deploy. |
Thanks for the response. I recreated the issue this morning. I have 2 remotes set up (bower and no_bower). Here are the pastebin links for the output: No_bower: http://pastebin.com/r9NX6FZ2 Docker Container Info after each deploy: http://pastebin.com/rmk19HKa |
@mtheadley great info! I see the reason is here,
for some strange reason, in case then Don't know why it's happening though.. |
If /app/.bower is executed, and there isn't a bower.json file, would that cause an error code? And as a result, cause the container to stop? Once the container stops, the attempt to attach would yield the error. Could you wrap a check in the pre-deploy step to check for the bower.json file? If it doesn't exist, it wouldn't call the /app/.bower command. Adjusting the echo statements based on the file's existence would help as well. (I can try to do that this evening with a fork/pull request.) |
the logic is a bit different: first to do in the way you describe, would make a bit more complex.. but I'll be happy if you submit PR on that. |
I think I understand that within the post-build step. The BOWERSCRIPT performs the check, then the if the file does exist, bower is installed via npm. Does the right side of the pipe (|) always execute? (my shell skills are rusty)
so if the BOWERSCRIPT doesn't install bower, the /app/.bower call is still injected into the container? |
|
I have exactly the same problem. Here's the last few lines of my failed deployment on an app which doesn't use bower:
|
Create a bower.json file on the root of your project with this info (change the name if you want):
dokku should be happy after that. |
Tried that, I'm afraid - no effect |
Guys, I'll try to diagnose that asap. Got back then I have results. |
@mtheadley @meatballs please let me know what exact version of |
From /home/dokku/VERSION :: v0.2.3 |
I'm seeing this exact same issue in the latest release, v0.3.12-4-gaf8aa56
Containers that use bower build without issue. |
I figured out a pretty simple fix that seems to work. I'll submit a pull request shortly. |
@erutherford good stuff! looking forward to check it out :) |
@erutherford Could you share what the fix was? |
Sorry, I should have reported back. I need to revisit this issue, because I have two identical systems, and I can't reproduce it on one of them so my test was bogus. When I figure out a fix, I'll submit a pull request. Sorry for the confusion. |
@erutherford or anyone else find a solution for this? I'm still getting this issue with v0.4.5 |
I hope I can explain this well enough. I have just recently starting to work with the wonders of dokku via Digital Ocean.
I have 2 projects. Lets call them app and api. The app is what you would expect, it has an Angular front end using bower and npm. Following the instructions, everything works perfect. I can deploy to the DO dokku instance, and everything is happy.
For the api project. It does not use bower (no bower.json file). When I push to the same dokku instance, the migration fails, and the container stops. Doing some inspection, I discovered the last command before the container stops is '/app/.bower'. After tinkering around a bit, I created a bower.json file for the api project and re-deployed. The addition of the bower.json file allowed the api project to deploy successfully.
Have I overlooked something within the steps for setting up this add-in? Would a check for the file in the pre-deploy step help?
Thanks,
//Mark.
The text was updated successfully, but these errors were encountered: