Coder Social home page Coder Social logo

Comments (6)

kylecotter avatar kylecotter commented on May 25, 2024 3

Of course Googling and going through GH issues leads me to a @timkelty thread...

Just wanted to chime in that in testing my specific setup of Docker for Mac + Mutagen + Craft Docker images with opcache enabled during local dev, enabling opcache.validate_timestamps per @jasonmccallister's thread here seems to be the best of both worlds re: speed vs seeing things immediately.

from docker.

jasonmccallister avatar jasonmccallister commented on May 25, 2024

@timkelty we could add a build argument to the dev build to disable that by default. When I'm developing I typically don't run into issues with opcache being enabled, in fact I have been bitten by deploying to an environment with opcache enabled and my code not working as expected (aka needed a refresh).

Happy to take a PR that ads the ARG and ENV for disabling opcache on dev though: https://github.com/craftcms/docker/blob/7.4/dev.Dockerfile

from docker.

timkelty avatar timkelty commented on May 25, 2024

Hmmm…I wonder why I got bitten by it so quickly?
Right away, no changes were reflected unless I did an opcache_reset().

Maybe it was because I was exclusively testing my entry point index.php?
Not sure, but it was the first time I ran into it locally.

Also – it looks like my concern about build cache only applies when the ARG is used in a RUN: https://docs.docker.com/engine/reference/builder/#impact-on-build-caching

from docker.

mikos avatar mikos commented on May 25, 2024

I'm fairly sure I got bitten by OPCACHE being enabled on the dev image too. Even with Craft in devMode I had to restart the app container to see changes I'd made to the twig templates.

from docker.

jasonmccallister avatar jasonmccallister commented on May 25, 2024

I'm going to look at updating the arg to disable opcache on dev images.

I still think it is useful to have a separate development image that is only used in a docker-compose.yaml file. The build steps each team takes vary so much that it would be nice to have a single image that is more flexible, but could lead to a bad configuration going into a production environment.

from docker.

timkelty avatar timkelty commented on May 25, 2024

👯‍♂️

from docker.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.