-
-
Notifications
You must be signed in to change notification settings - Fork 26
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 for local development? #332
Comments
Sure! Go ahead and do it. |
Okay, I'm working on this now. |
I'm also looking at this - I was going to take a look at #333 - and I didn't want to install a load of stuff - and though that the docker approach might be cool (I use it at work for this sort of thing). So far I have : |
@edent - One thing I'm not sure about : the code (and the CONTRIBUTING.md file) use composer to install dependancies - but there isn't a composer.json file included? unless the composer installation includes the version number, then won't there be the possibility that developers could have different version dependencies installed? |
Thanks for the prompt @computamike - I've added the composer.json file |
Just to add, I'm not working on this at the moment - I couldn't get the environment file to change the cache location and eventually I gave up in frustration (still not sure what the problem was). |
@pwaring - what was the issue with the cache location? at the moment I have caching working - but I'm guessing you wanted to map it somewhere else on the container so that it wasn't mapped back to the host file system? |
@computamike Yes, I wanted the cache to use |
@pwaring - I thought that might be it. Caching configuration is provided by bundle configuration - https://symfonycasts.com/screencast/symfony-fundamentals/bundle-config#play
|
Hi @pwaring - I'd be interested in getting your opinion on my branch for adding docker support for local development - I'm putting together a guide for developers so it's not 100% yet. https://github.com/computamike/openbenches.org/tree/Feature/docker-setup I currently have the code volume mapped from a Windows drive (as opposed to running the code in wsl) and the page performance is not great - but I have read that storing the code like that can have performance issues. |
Just an update - I'm currently attempting to get Xdebug working - but from what I can see it's just a case of open the port, install Xdebug and set up some config and off you go... |
@computamike If you want an example of how to get it working in VSCode, you can lift the config from a repository I work on: https://github.com/phpdev-uk/slim-skeleton Specifically the launch.json: https://github.com/phpdev-uk/slim-skeleton/blob/main/.vscode/launch.json Dockerfile: https://github.com/phpdev-uk/slim-skeleton/blob/main/docker/Dockerfile xdebug.ini: https://github.com/phpdev-uk/slim-skeleton/blob/main/docker/php/xdebug.ini It took me a long time to get this working as everything has to match - one minor difference and it won't work, plus you won't necessarily get a helpful error message as to why... |
Thanks - I got it working last night - then the cachinf stopped working... I open port 9003 on the defender firewall - but I'm not sure I needed to do that. I'll make sure what i have looks good compared to what you've done - probably tonight. |
Would it be useful to have a Docker environment that could be used for local development, with everything pre-installed and with version numbers (e.g. for PHP) matching production? I've moved lots of existing bespoke projects into Docker so I think it would be doable.
The text was updated successfully, but these errors were encountered: