From 664aa4a63fb837e5106b49e708aa04bfca8dbbd6 Mon Sep 17 00:00:00 2001 From: victor Date: Fri, 12 Dec 2025 19:17:36 +0000 Subject: [PATCH 1/5] Add step to trust mise config in setup script --- bin/setup | 1 + 1 file changed, 1 insertion(+) diff --git a/bin/setup b/bin/setup index eee1d9df5a..8454192997 100755 --- a/bin/setup +++ b/bin/setup @@ -81,6 +81,7 @@ gum style --foreground 153 " ˚ ∘ ∘ ˚ " gum style --foreground 111 --bold " ∘˚˳°∘° 𝒻𝒾𝓏𝓏𝓎 °∘°˳˚∘ " echo +step "Trusting mise config" mise trust step "Installing Ruby" mise install --yes eval "$(mise hook-env -s bash)" From 75181226731788f774e032e8f3af6ad7d347ac71 Mon Sep 17 00:00:00 2001 From: victor Date: Fri, 12 Dec 2025 19:17:54 +0000 Subject: [PATCH 2/5] Add Dockerfile for development container setup --- .devcontainer/Dockerfile | 7 +++++++ 1 file changed, 7 insertions(+) create mode 100644 .devcontainer/Dockerfile diff --git a/.devcontainer/Dockerfile b/.devcontainer/Dockerfile new file mode 100644 index 0000000000..896970f382 --- /dev/null +++ b/.devcontainer/Dockerfile @@ -0,0 +1,7 @@ +# Make sure RUBY_VERSION matches the Ruby version in .ruby-version +ARG RUBY_VERSION=3.4.7 +FROM ghcr.io/rails/devcontainer/images/ruby:$RUBY_VERSION + +# Ensure binding is always 0.0.0.0 +# Binds the server to all IP addresses of the container, so it can be accessed from outside the container. +ENV BINDING="0.0.0.0" From 39ed516b8251634c73369c17298cc0c4187c1558 Mon Sep 17 00:00:00 2001 From: victor Date: Fri, 12 Dec 2025 19:18:10 +0000 Subject: [PATCH 3/5] Add Docker Compose configuration for development environment --- .devcontainer/compose.yaml | 31 +++++++++++++++++++++++++++++++ 1 file changed, 31 insertions(+) create mode 100644 .devcontainer/compose.yaml diff --git a/.devcontainer/compose.yaml b/.devcontainer/compose.yaml new file mode 100644 index 0000000000..fe36d3810c --- /dev/null +++ b/.devcontainer/compose.yaml @@ -0,0 +1,31 @@ +name: "fizzy" + +services: + rails: + container_name: ${COMPOSE_PROJECT_NAME}-rails + build: + context: .. + dockerfile: .devcontainer/Dockerfile + + volumes: + - ../../${COMPOSE_PROJECT_NAME}:/workspaces/${COMPOSE_PROJECT_NAME}:cached + - ~/.config/gh:/home/dev/.config/gh:cached + + environment: + GH_CONFIG_DIR: /home/dev/.config/gh + + # Overrides default command so things don't shut down after the process ends. + command: sleep infinity + + # Uncomment the next line to use a non-root user for all processes. + # user: vscode + + # Use "forwardPorts" in **devcontainer.json** to forward an app port locally. + # (Adding the "ports" property to this file will not forward from a Codespace.) + depends_on: + - selenium + + selenium: + container_name: ${COMPOSE_PROJECT_NAME}-selenium + image: selenium/standalone-chromium + restart: unless-stopped From 7f62279b6cabc482c230570ac6f150443b999a2f Mon Sep 17 00:00:00 2001 From: victor Date: Fri, 12 Dec 2025 19:18:33 +0000 Subject: [PATCH 4/5] Add devcontainer configuration for development environment --- .devcontainer/devcontainer.json | 38 +++++++++++++++++++++++++++++++++ 1 file changed, 38 insertions(+) create mode 100644 .devcontainer/devcontainer.json diff --git a/.devcontainer/devcontainer.json b/.devcontainer/devcontainer.json new file mode 100644 index 0000000000..07f7a39ed5 --- /dev/null +++ b/.devcontainer/devcontainer.json @@ -0,0 +1,38 @@ +// For format details, see https://containers.dev/implementors/json_reference/. +// For config options, see the README at: https://github.com/devcontainers/templates/tree/main/src/ruby +{ + "name": "fizzy", + "dockerComposeFile": "compose.yaml", + "service": "rails", + "workspaceFolder": "/workspaces/${localWorkspaceFolderBasename}", + + // Features to add to the dev container. More info: https://containers.dev/features. + "features": { + "ghcr.io/devcontainers/features/github-cli:1": {}, + "ghcr.io/rails/devcontainer/features/activestorage": {}, + "ghcr.io/devcontainers/features/docker-outside-of-docker:1": {"moby":false}, + "ghcr.io/rails/devcontainer/features/sqlite3": {}, + "ghcr.io/rio/features/gum:1": {}, + "ghcr.io/stuartleeks/dev-container-features/shell-history:0": {} + }, + + "containerEnv": { + "RAILS_ENV": "development", + "GH_TOKEN": "${localEnv:GH_TOKEN}", + "CAPYBARA_SERVER_PORT": "45678", + "SELENIUM_HOST": "selenium", + }, + + // Use 'forwardPorts' to make a list of ports inside the container available locally. + "forwardPorts": [3000, 3006, 5001], + + // Configure tool-specific properties. + // "customizations": {}, + + // Uncomment to connect as root instead. More info: https://containers.dev/implementors/json_reference/#remoteUser. + // "remoteUser": "root", + + + // Use 'postCreateCommand' to run commands after the container is created. + "postCreateCommand": "bin/setup --skip-server" +} From ce7f95e406ac87bcf1670a37c5075eff2ee678c8 Mon Sep 17 00:00:00 2001 From: victor Date: Fri, 12 Dec 2025 19:30:38 +0000 Subject: [PATCH 5/5] Fix indentation in Docker Compose configuration --- .devcontainer/compose.yaml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.devcontainer/compose.yaml b/.devcontainer/compose.yaml index fe36d3810c..b56c77016e 100644 --- a/.devcontainer/compose.yaml +++ b/.devcontainer/compose.yaml @@ -8,8 +8,8 @@ services: dockerfile: .devcontainer/Dockerfile volumes: - - ../../${COMPOSE_PROJECT_NAME}:/workspaces/${COMPOSE_PROJECT_NAME}:cached - - ~/.config/gh:/home/dev/.config/gh:cached + - ../../${COMPOSE_PROJECT_NAME}:/workspaces/${COMPOSE_PROJECT_NAME}:cached + - ~/.config/gh:/home/dev/.config/gh:cached environment: GH_CONFIG_DIR: /home/dev/.config/gh @@ -23,7 +23,7 @@ services: # Use "forwardPorts" in **devcontainer.json** to forward an app port locally. # (Adding the "ports" property to this file will not forward from a Codespace.) depends_on: - - selenium + - selenium selenium: container_name: ${COMPOSE_PROJECT_NAME}-selenium