From 660db205b8cab19b4114bd834f19ab12df38e8f5 Mon Sep 17 00:00:00 2001 From: Cirdes Date: Thu, 20 Nov 2025 15:10:09 +0000 Subject: [PATCH 1/2] Fix devcontainer setup: Migrate to Docker Compose and upgrade Ruby to 3.4.7 --- .devcontainer/Dockerfile | 7 +++++++ .devcontainer/compose.yaml | 13 ++++++++++++ .devcontainer/devcontainer.json | 36 +++++++++++++++------------------ .standard.yml | 2 +- .tool-versions | 2 +- LICENSE.txt | 2 +- 6 files changed, 39 insertions(+), 23 deletions(-) create mode 100644 .devcontainer/Dockerfile create mode 100644 .devcontainer/compose.yaml diff --git a/.devcontainer/Dockerfile b/.devcontainer/Dockerfile new file mode 100644 index 00000000..4b7a79a3 --- /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" \ No newline at end of file diff --git a/.devcontainer/compose.yaml b/.devcontainer/compose.yaml new file mode 100644 index 00000000..16baf6cb --- /dev/null +++ b/.devcontainer/compose.yaml @@ -0,0 +1,13 @@ +name: "ruby_ui" + +services: + app: + build: + context: .. + dockerfile: .devcontainer/Dockerfile + + volumes: + - ../../ruby_ui:/workspaces/ruby_ui:cached + + # Overrides default command so things don't shut down after the process ends. + command: sleep infinity \ No newline at end of file diff --git a/.devcontainer/devcontainer.json b/.devcontainer/devcontainer.json index 0d58ecce..6a5fe068 100644 --- a/.devcontainer/devcontainer.json +++ b/.devcontainer/devcontainer.json @@ -1,33 +1,29 @@ -// For format details, see https://aka.ms/devcontainer.json. For config options, see the -// README at: https://github.com/devcontainers/templates/tree/main/src/ruby +// 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": "RubyUI", - // Or use a Dockerfile or Docker Compose file. More info: https://containers.dev/guide/dockerfile - "image": "ghcr.io/rails/devcontainer/images/ruby:3.3.3", + "name": "ruby_ui", + "dockerComposeFile": "compose.yaml", + "service": "app", + "workspaceFolder": "/workspaces/${localWorkspaceFolderBasename}", // Features to add to the dev container. More info: https://containers.dev/features. - // Make sure RUBY_VERSION matches the Ruby version in .ruby-version "features": { - "ghcr.io/devcontainers/features/github-cli:1": {} + "ghcr.io/devcontainers/features/github-cli:1": {}, + "ghcr.io/devcontainers/features/docker-outside-of-docker:1": { + "moby": false + } }, "customizations": { "vscode": { "extensions": [ "testdouble.vscode-standard-ruby", "Shopify.ruby-lsp" - ], - "settings": { - "rubyLsp.rubyVersionManager": { - "identifier": "rbenv" - } - } + ] } }, - // Use 'forwardPorts' to make a list of ports inside the container available locally. - // "forwardPorts": [], - // Use 'postCreateCommand' to run commands after the container is created. - "onCreateCommand": "bundle install" // Configure tool-specific properties. // "customizations": {}, - // Uncomment to connect as root instead. More info: https://aka.ms/dev-containers-non-root. - // "remoteUser": "root" -} + // 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": "bundle check || bundle install" +} \ No newline at end of file diff --git a/.standard.yml b/.standard.yml index c5a0d44b..0bd9950b 100644 --- a/.standard.yml +++ b/.standard.yml @@ -1,3 +1,3 @@ -ruby_version: 3.3 +ruby_version: 3.4 format: progress parallel: true diff --git a/.tool-versions b/.tool-versions index 3f7cdb28..b92a57ca 100644 --- a/.tool-versions +++ b/.tool-versions @@ -1,2 +1,2 @@ -ruby 3.3.5 +ruby 3.4.7 diff --git a/LICENSE.txt b/LICENSE.txt index f2420e82..735a5754 100644 --- a/LICENSE.txt +++ b/LICENSE.txt @@ -1,6 +1,6 @@ The MIT License (MIT) -Copyright (c) 2024 RubyUI +Copyright (c) 2025 RubyUI Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal From bc2eb4c791c1edbccc1b92c3e6d41d3c7b8207eb Mon Sep 17 00:00:00 2001 From: Cirdes Date: Thu, 20 Nov 2025 15:14:07 +0000 Subject: [PATCH 2/2] space fixes --- .devcontainer/Dockerfile | 2 +- .devcontainer/compose.yaml | 7 +++---- 2 files changed, 4 insertions(+), 5 deletions(-) diff --git a/.devcontainer/Dockerfile b/.devcontainer/Dockerfile index 4b7a79a3..896970f3 100644 --- a/.devcontainer/Dockerfile +++ b/.devcontainer/Dockerfile @@ -4,4 +4,4 @@ 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" \ No newline at end of file +ENV BINDING="0.0.0.0" diff --git a/.devcontainer/compose.yaml b/.devcontainer/compose.yaml index 16baf6cb..a86c93f8 100644 --- a/.devcontainer/compose.yaml +++ b/.devcontainer/compose.yaml @@ -7,7 +7,6 @@ services: dockerfile: .devcontainer/Dockerfile volumes: - - ../../ruby_ui:/workspaces/ruby_ui:cached - - # Overrides default command so things don't shut down after the process ends. - command: sleep infinity \ No newline at end of file + - ../../ruby_ui:/workspaces/ruby_ui:cached + # Overrides default command so things don't shut down after the process ends. + command: sleep infinity