-
Notifications
You must be signed in to change notification settings - Fork 913
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
Docker dev environment #4165
Docker dev environment #4165
Conversation
@jgmize - I'd be happy to try this out, but I'm a little lost on where to start. I do have the Docker Beta for Mac installed, but not really sure where to go from there? |
Thanks @alexgibson, first just try checking out the branch locally and run 'make help' to give you a list of commands with brief explanations of what you can do. try out 'make gulp' first and let me know if it "just works" or not. On my machine 'make gulp' eats a lot of CPU, so you might also try just running 'make devserver' to run bedrock itself in the docker container and running 'gulp media:watch' on your local machine as a workaround. |
Looks like I broke 'make help' in my last commit; will fix that, but in the meantime you can just view the docs/make-commands.rst file directly |
another issue with 'make gulp' is that currently control-c doesn't actually stop it-- you can switch to another terminal window and run 'make stop' from the bedrock dir to stop all your docker containers, or you can quit and relaunch docker from the gui. |
I tried
|
The most recent build pushed I considered having the make commands fall back automatically to |
My first thought is how would this work with pulling down other people's branches, PR's that need code review for example. It would be nice to try and make this as easy as possible, given that it's an almost daily occurrence? |
One way would be to just type |
Makes sense, thanks (this is still a whole new world to me). I ran |
This seems to work for me pretty nicely locally, although I had to avoid using "make gulp" as it uses up way too much CPU. Running "make devserver" in one terminal window, and "gulp media:watch" in another seems to work pretty well performance wise. I'll give this some more testing, but I look forward to trying it out with some real day to day dev-work. Nice job 🚀 |
As mentioned in IRC, I've added a |
I've been thinking about the |
Yes, as I mentioned in #4165 (comment) that's what I did with the viewsourceconf Makefile, and we can take a similar approach here if the tradeoffs are worth it. |
one simple option would be to change the |
I noticed that even running locally the gulp watch process is fairly CPU intensive, eating 50-60% on my machine. Since the minimum that gulp is doing now is just copying from media to static automatically I added a little |
continuing on that theme, I was thinking we could use fswatch to trigger linting and other single run gulp tasks within a container, eliminating the need to install gulp locally-- I'll experiment with this as well |
Added a52aec5 to do this. |
Just pushed some changes that reduced the bedrock dev image from 393 MB to 249 MB: https://hub.docker.com/r/mozorg/bedrock_dev/tags/ |
I'll just say that it's far more likely for a webdev to already have node, npm, gulp, etc. installed than fswatch. Can we also keep the gulp way? |
I think @pmac does have a good point here. I'm all for a super efficient |
Yes, I was planning on supporting all three approaches and documenting the tradeoffs. |
I'd like to vote to remove commands like |
After discussion keeping |
ebf932c
to
d4f1a72
Compare
Strip DEV= from .env Remove local registry prefix from deis pull command
Add webhook-dispatch stub
Decrease verbosity
Escape $ in awk subshell
Handle multiple branches
Add build-deploy-demo
This needs to be reworked significantly, closing in favor of new PR. |
This is still WIP but opening now for early testing and feedback. See https://bugzilla.mozilla.org/show_bug.cgi?id=1276208#c2 for more details
TODO: