[openstreetmap/openstreetmap-website] Support for Development Containers (devcontainers) (PR #6424)

Pablo Brasero notifications at github.com
Fri Oct 31 14:45:17 UTC 2025


@pablobm commented on this pull request.



> +
+  // Features to add to the dev container. More info: https://containers.dev/features.
+  "features": {
+    "ghcr.io/devcontainers/features/github-cli:1": {},
+    "ghcr.io/devcontainers/features/node:1": {},
+    "ghcr.io/rails/devcontainer/features/activestorage": {},
+    "ghcr.io/rails/devcontainer/features/postgres-client": {}
+  },
+
+  "containerEnv": {
+    "CAPYBARA_SERVER_PORT": "45678",
+    "DB_HOST": "postgres"
+  },
+
+  // Use 'forwardPorts' to make a list of ports inside the container available locally.
+  "forwardPorts": [3000, 5432, 6379],

Good catch. The Redis port is a leftover that I failed to remove. The initial command `bin/rails devcontainer` generates a configuration that includes Redis, which I removed except for that detail.

As for the use of the list of ports... actually I have no idea. I'm no expert either, and I was playing with it now and I can't make any sense of it. I can't access Postgres from outside the container, and if I remove 3000 I can still access the web server with my browser. I'm now wondering if we should remove this line altogether as I don't know what it does at all :thinking: The documentation is not very clear.

-- 
Reply to this email directly or view it on GitHub:
https://github.com/openstreetmap/openstreetmap-website/pull/6424#discussion_r2481663964
You are receiving this because you are subscribed to this thread.

Message ID: <openstreetmap/openstreetmap-website/pull/6424/review/3404628482 at github.com>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.openstreetmap.org/pipermail/rails-dev/attachments/20251031/4ef45c91/attachment.htm>


More information about the rails-dev mailing list