Commit Graph

3 Commits

Author SHA1 Message Date
Rafael Mendonça França 5cfc1f8f56
Remove the default network from the devcontainer compose
And stop exposing the capybara server port to all interfaces.

We were using this just to make sure the selenium container can access
the capybara server but it can with the default bridge network.
2024-06-04 19:18:07 +00:00
Andrew Novoselac 16afdbea70 Use devcontainer features for optional dependencies
We have created our own features for optional Rails dependencies needed for active storage, postgres and mysql. Features provide a bit better ergonomics for adding or removing these from the devcontainer, and previously we were always installing these dependencies via the devcontainer's dockerfile, whether the app was using them or not.

With this change, when we generate the app, we just add the features we need to the devcontainer.json. And also, we swap features in and out as need when doing db:system:change.
2024-04-12 10:13:42 -04:00
Andrew Novoselac c90a8701e5
Generate a .devcontainer folder and its contents when creating a new app.
The .devcontainer folder includes everything needed to boot the app and do development in a remote container.

The container setup includes:
 - A redis container for Kredis, ActionCable etc.
 - A database (SQLite, Postgres, MySQL or MariaDB)
 - A Headless chrome container for system tests
 - Active Storage configured to use the local disk and with preview features working

If any of these options are skipped in the app setup they will not be included in the container configuration.

These files can be skipped using the `--no-devcontainer` option.

Co-authored-by: Rafael Mendonça França <rafael@franca.dev>
2024-02-14 20:59:48 +00:00