-
-
Notifications
You must be signed in to change notification settings - Fork 438
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
Include basic Docker environment #644
Comments
👍 The project must evolve |
I use Lando for all of my Magento projects (M1 & M2). I strongly suggest using Lando so that the barrier of entry to containers for less experienced devs is much lower. This repository could be distributed with a For those familiar with Platform.sh, Lando works in a very similar manner. Also, I have a PR and issue open with Lando to provide an extensible default Magento 2 recipe. If there is enough interest from the OpenMage community, I will consider creating a PR for a default Magento 1 recipe as well. |
Im using ddev :) |
I would (actually I started already, like two times) do this in a separate repository. There are different approaches to the whole thing, and not a single truth. one approach you can find in https://github.com/OpenMage/Testfield/tree/master/.docker where I did use docker for everything non-php and did run magento natively with the builtin webserver. For freelancers and agencies they need a more flexible approach I guess (many use stuff based on local dns resolver for domain lookups, and Iam not sure, how we can prepare something, which will cover their needs. Or should we just go the easy way and provide the most simple approach which likely is not performing perfectly (on macs)? In any case, happy to help/review/test this, have currently all 3 major OS available |
While being convenient I feel this encourages users to work with the repo in the worst possible way. Ideally this repo is nothing but a dependency for actual projects that have their own repo and dev environment handling. I would prefer we only provide documentation on how to setup a recommended workflow/dev environment with Docker. |
@Flyingmana - this is why I recommended Lando. OpenMage can say, "For those new to Magento and trying it out for the first time, clone the repo and run Any establish freelancer or agency will likely already have a preferred setup, I think this thread is about giving devs who are new to Magento something they can quickly spin up and start playing around in. |
@tylerssn The first step is actually "Install Lando" which while not difficult it is not exactly simple either. It is not a single binary like docker-compose and docker-compose is a requirement anyway so I think it adds extra steps. I looked at the docs for a bit and I think a good dev environment can be setup with just "docker-compose up" without adding additional layers.
The problem with this is then their entire custom environment is part of the dev environment. Having a basic Docker setup would allow a developer who wants to work on a contribution using a completely pristine environment much easier. |
The project by @alexcheng1982 looks like a great example. Perhaps he would be interested in keeping a fork which uses magento-lts instead of magento-mirror and then we could just reference it in the README. |
okay, so for lando it would just need a recipe which is created on their side, that would also be good PR(as in PublicRelations) for us to directly add it as OpenMage and it would not need any change in our repository. If for a docker container we could work together with one of the existing ones, that would be a lot easier, and we can reference (maybe multiple) vie Readme and Website. And maybe we also have at one point an example/demo project ready, which fetches OpenMage as a dependency via composer, as it should be for an actual project. By the Way, is anyone aware of public OpenMage demos? Has anyone the possibilities to get hosting resources for one? |
@colinmollenhour I think it's better to create an @tylerssn Same for Lando, it's possible to create |
I already use Docker in development and production (via Elastic Beanstalk It would be even a cooler idea to have two flavours: one production ready and one development ready (with Xdebug, Blackfire/MagentoProfiler + many useful Magento/PHP development settings by default). It would be better to have a separate repository with a |
One problem with importing the project with composer.json is that it will not be a fully functional git repo so if you were developing a patch you'd then have to monkey around to get your stuff committed and pushed. For production this is fine, but for development not so good, that's why having the docker-compose.yml file in the repo would be nice, so that the user can easily work on whatever fork/branch they want without fighting against tooling like composer. |
I see your point @colinmollenhour and I agree. I didn't think about that specific issue of making contributions just from a module development perpective. |
We've being using meanbee/docker-magento set-up, and it works great. |
I added a setup to have OpenMage installed with the sample data inside docker. Its not so shiny like most other projects, but its a beginning and targeted for people, who want to have a first look at the project and may not know what the minimum requirements are. |
@Flyingmana - I see that you have created a docker-setups config. I'd like to revisit the idea of OpenMage officially demoing a host/dev setup. I believe this is important because if you can give new and existing developers a configuration that Just Works™️ then the opportunity to grow the project is that much greater. I don't have a dog in the fight other than supporting OpenMage - I have no affiliation with Lando. That said, I think it's worth considering including a Lando recently partnered with Platform.sh and released a I understand that this is venturing into very opinionated territory but you have to consider the value (especially to those new to Magento) this adds spoon-feeding the developer a fully functional stack. To undo this OpenMage could document the remove of the YAML files or let the user know they can be ignored altogether if they have their own preferred docker/host stack. |
@tylerssn would you be able to provide this config? |
Once the platform.sh recipe is stable, I'd be happy to provide it. The files would have to be in the root directory. They could be in a subdirectory with a ReadMe and/or an optional bash script to copy them into place. |
* Add development environment setup files and README. Refs #644 * Added mention of ddev. * Fix for first-time user. * Fix file permissions for first time install. * Reduce installation steps to one.
Added a basic Docker-Compose environment that can be setup in just one step: https://github.com/OpenMage/magento-lts/blob/1.9.4.x/dev/openmage/README.md For some users this will be sufficient, others may want something more robust like lando, so more options are certainly still welcome so I'll leave this open. |
Fixed in #1012 |
I think these days it makes sense to include a basic Docker environment (docker-compose.yml, Dockerfiles, config files) with a project so that a working environment can be launched quickly using a simple
docker-compose up
allowing users to easily try the project out and also easily contribute improvements that are tested in Magento LTS and not just patched in from another installation.This is not meant to be a production-ready environment although it could serve as a starting point for such.
I'd like to get thoughts and feedback on:
The text was updated successfully, but these errors were encountered: