docker-magento icon indicating copy to clipboard operation
docker-magento copied to clipboard

How to add magepack to markshust/docker-magento ?

Open artmouse opened this issue 4 years ago • 9 comments

https://github.com/magesuite/magepack/issues/27#issuecomment-665633218

artmouse avatar Jul 29 '20 12:07 artmouse

I'm going to look into this very shortly. Magepack has been on my radar.

markshust avatar Jul 30 '20 10:07 markshust

We did this recently, these changes we applied (I hope I remember them correctly):

In the phpfpm Dockerfile we extended the npm install part to also install yarn and the magesuite & magepack dependencies:

RUN apt-get install -y gnupg \
  && curl -sL https://deb.nodesource.com/setup_10.x | bash - \
  && curl -sS https://dl.yarnpkg.com/debian/pubkey.gpg | apt-key add - \
  && echo "deb https://dl.yarnpkg.com/debian/ stable main" | tee /etc/apt/sources.list.d/yarn.list \
  && apt update \
  && apt install -y nodejs yarn automake \
  && mkdir /var/www/.config /var/www/.npm /var/www/.yarn \
  && chown app:app /var/www/.config /var/www/.npm /var/www/.yarn \
  && npm install -g grunt-cli @creativestyle/magesuite-theme-generator magepack

In bin/setup we run yarn install in both the project root & the theme folder we created (that might be the tricky to generalize in the setup script) Also we added a call to bin/magepack bundle after setup:static-content:deploy. bin/magepack simply calls magepack in the container, similar to bin/magento.

Hope that helps.

shochdoerfer avatar Aug 17 '21 19:08 shochdoerfer

Awesome, thanks much @shochdoerfer -- this fell off my radar for some reason, but I've been still meaning to look into this. I'll review shortly and test this out probably early next week.

markshust avatar Aug 31 '21 14:08 markshust

@markshust you are welcome. If you need more insights, let me know. Happy to share our magepack setup in general with you. We did some custom things because of how magepack works when it comes to extending or customizing a theme. Not sure if it makes sense to generalize this and include it in this project.

shochdoerfer avatar Aug 31 '21 17:08 shochdoerfer

@shochdoerfer great, all sounds good. I found out my MBP's SMB chip failed, so it's currently in the lab getting resolved, so I'm delayed an additional ~2 weeks on this, as my MBA is underpowered to do much of any Docker work. This is on my radar though and I will take care of it as soon as I can, and reach out to you if needed about your other customizations 😁

markshust avatar Sep 07 '21 13:09 markshust

A work around is to do this on the container for now: bin/npm install -g magepack or if there are permission errors: bin/root npm install -g magepack

Sental avatar Sep 12 '23 09:09 Sental

Thanks @Sental! Wow, it's been a while since this ticket. My computer went haywire a couple years back and I probably lost track of this ticket. I'll try to look at it again soon.

markshust avatar Sep 22 '23 03:09 markshust

Pulling this one out of the weeds. Is https://github.com/markshust/docker-magento/issues/286#issuecomment-900556320 by @shochdoerfer the way to go here?

derekBaldwinGG avatar Apr 26 '24 17:04 derekBaldwinGG

Whoah... this one fell by the wayside again 🙃. Yes, most likely @shochdoerfer's method is the right way to go with this one 👍

markshust avatar Apr 27 '24 16:04 markshust