You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
We added support for Docker-based development in 2021 (based on a PR started in 2019). At this time there were no clear conventions for setting up docker-based development environments, so we did our own thing.
Nowadays, a number of tools support the "Development Container" specification. This provides a few additional benefits, for example tighter integration between code editors and the containers (e.g. running the rubocop process within the container, but seeing the syntax highlighting in your editor UI). Dev containers are supported by vscode and intellij code editors, and are also a part of Github Codespaces. Codespaces allow developers to make code changes, run tests and make PRs, all without installing anything locally. So it would be nice to fully support that too.
It's also notable that rails 7.2 added built-in support for devcontainers configuration, so running bundle exec rails devcontainer gets us started on the setup and generating the configuration files.
I therefore propose:
We set up the devcontainer configuration and make sure it works.
We move the docker part of CI to use the devcontainer configuration.
We remove the original Docker configuration and update the documentation.
We also consider removing the vagrant configuration.
The text was updated successfully, but these errors were encountered:
Thanks, this looks like a great suggestion. I gave it a try, created a new clone of the repo, then added a new devcontainer using bundle exec rails container.
Initially I was a bit struggling with (Debian, Rails, npm) packages on generated devcontainer. I believe we can probably reuse a lot of the existing Dockerfile and copy it over to .devcontainer/Dockerfile, thereby hopefully addressing these issues. There's a bit of overlap between the "postCreateCommand" in devcontainer.json and the existing Dockerfile, which would need to be resolved.
Then I added memcached and mailpit to compose.yaml and adjusted settings.local.yml accordingly. Both were fairly trivial to get up and running. They allow me to run more production-like scenarios without much hassle. Also, unit tests are passing successfully.
Overall I see a much improved DX compared to the old Dockerfile.
We added support for Docker-based development in 2021 (based on a PR started in 2019). At this time there were no clear conventions for setting up docker-based development environments, so we did our own thing.
Nowadays, a number of tools support the "Development Container" specification. This provides a few additional benefits, for example tighter integration between code editors and the containers (e.g. running the rubocop process within the container, but seeing the syntax highlighting in your editor UI). Dev containers are supported by vscode and intellij code editors, and are also a part of Github Codespaces. Codespaces allow developers to make code changes, run tests and make PRs, all without installing anything locally. So it would be nice to fully support that too.
It's also notable that rails 7.2 added built-in support for devcontainers configuration, so running
bundle exec rails devcontainer
gets us started on the setup and generating the configuration files.I therefore propose:
The text was updated successfully, but these errors were encountered: