markshust / docker-magento

Mark Shust's Docker Configuration for Magento
https://m.academy/courses/set-up-magento-2-development-environment-docker/
MIT License
2.51k stars 992 forks source link

How to add magepack to markshust/docker-magento ? #286

Open artmouse opened 4 years ago

artmouse commented 4 years ago

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

markshust commented 4 years ago

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

shochdoerfer commented 3 years ago

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.

markshust commented 3 years ago

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.

shochdoerfer commented 3 years ago

@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.

markshust commented 2 years ago

@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 😁

Sental commented 11 months ago

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

markshust commented 11 months ago

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.

derekBaldwinGG commented 4 months ago

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?

markshust commented 4 months ago

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