Hello, I am attempting to "habitize" an application that already uses docker. Right now, I am using the Dockerfile as a reference to create the plan but I am running into issues. For some background, the application currently builds an api docker image and an app docker image. Docker-compose is used to marry the two images when running locally.
Attached are the images of the app plan.sh, Dockerfile, and error on build.
I am unsure what extra information is relevant to this issue, so please let me know if I can clarify or share additional info!
Itās hard to say, Iām not a pro at node.js there are some other folks around who might have more luck, but from what I can tell it looks like just a permissions issue which is pretty strange. If you remove the pkg_svc_user line in your plan do you get the same permissions failure?
It appears to give the same error with and without the pkg_svc_user. I noticed in the Dockerfile that a USER_NAME is created, and was trying to bring that over to the plan.sh. Is the pkg_svc_user the right approach to take?
Nope, pkg_svc_user doesnāt do any user creation itās just determines which user the service will run as at runtime. Iāll see if I canāt get someone with some more node.js experience to take a look at this.
There is no .gitignore in the directory I am rsyncing. I have narrowed down the issue to node-sass. For some reason when I run ānpm install -g --unsafe-perm node-sassā and then try to execute a node-sass command it says the command is not found. This issue occurs whether or not node-sass is installed globally. Any ideas where to go from here?
Edit: I posted the updated plan.sh, but I think it needs to be approved.
One of the things I notice at the beginning of your error output is the error āuser āundefinedā d9oes not have permission to access the dev dirā - so it definitely looks like the app user is not being created - let me dig into this a bit.
Alright, well at least the user is being created, so that might be progress (I often consider a different error message to be progress). Taking another lookā¦
Thank you for the suggestion, but I already have that change in my current plan.
I forgot to mention that I commented out the ānode-sassā command in do_build() to test the switch from āuser-nameā to āappā.
When it is uncommented, the node-sass command in do_build() cannot be executed due to a command not found error.
I would think that a global install of node-sass would resolve this issue, but it does not seem to be that way.
I have tried running fix_node_modules before and after the node-sass command with no luck.
I have also attempted not globally installing the package, and the same error is produced.
EDIT: I have updated the post with my plan.sh to reflect my most recent changes.
Thanks for the input! I went ahead and removed any ownership changes, and removed the unecessary npm installs.
I added core/sassc to the dependencies, but I am still seeing a ānode-sass: command not foundā during the build.
I have updated my plan.sh in the post above to reflect my most recent changes.