• Log In
  • Sign Up
    • Preferences question:
      If a service uses Docker/Kubernetes in production, should you use those locally during development as well, or just run it like always with all of the dependencies installed onto your machine directly?

    • Hey Dan!

      I can't speak authoritatively since it's not my main area of expertise, but Cake uses Docker in different ways in production and development (though we don't use Kubernetes).

      In production the Cake web app and task workers run in Docker containers, but other services like MySQL, Redis, and Elasticsearch aren't currently Dockerized.

      In development we run the Cake web app and task workers locally on macOS, with MySQL, Redis, and Elasticsearch in Docker containers managed with Docker Compose. We found this to be the best tradeoff between good local performance and easy dev environment setup, and it's been working well for us.

    • That local development story is what I'm trying to get right. I want people to be able to pull the image down, build it, run it, and get working.

      Right now this means an image with ruby, node, and some other things. A directory exposed to the developer's editor, and memcached running somewhere (probably another container).

    • I think that's definitely the dream for local development!

      One improvement I'd like to make to Cake's dev environment is to Dockerize the Node.js web app so that there are truly no dependencies (other than Docker itself) on the local system.

      Performance is a bit of a blocker though. During development the web app needs to restart to pick up server-side changes and webpack needs to recompile client-side changes, both of which are CPU and filesystem intensive and are much slower when running in a Docker container.

      It's also a little tricky to handle cloud services that can't be replicated locally, like Amazon SQS and Stream.