File tree Expand file tree Collapse file tree 4 files changed +72
-1
lines changed Expand file tree Collapse file tree 4 files changed +72
-1
lines changed Original file line number Diff line number Diff line change
1
+ # Use the official Ruby image as base
2
+ FROM ruby:3.3-slim
3
+
4
+ # Install system dependencies
5
+ RUN apt-get update -qq && apt-get install -y \
6
+ build-essential \
7
+ git \
8
+ curl \
9
+ sqlite3 \
10
+ libsqlite3-dev \
11
+ libyaml-dev \
12
+ && rm -rf /var/lib/apt/lists/*
13
+
14
+ # Install Node.js (for documentation site)
15
+ RUN curl -fsSL https://deb.nodesource.com/setup_lts.x | bash - \
16
+ && apt-get install -y nodejs
17
+
18
+ # Create a non-root user
19
+ RUN groupadd --gid 1000 user \
20
+ && useradd --uid 1000 --gid user --shell /bin/bash --create-home user
21
+
22
+ # Set up the working directory
23
+ WORKDIR /workspace
24
+
25
+ # Install bundler
26
+ RUN gem install bundler
27
+
28
+ # Create cache directory for gems
29
+ RUN mkdir -p /usr/local/bundle && chown -R user:user /usr/local/bundle
30
+
31
+ # Switch to non-root user
32
+ USER user
33
+
34
+ # Set up git config (helps with development)
35
+ RUN git config --global init.defaultBranch main
36
+
37
+ # Set the default shell
38
+ SHELL ["/bin/bash" , "-c" ]
Original file line number Diff line number Diff line change
1
+ {
2
+ "name" : " Inertia Rails Development" ,
3
+ "dockerComposeFile" : " docker-compose.yml" ,
4
+ "service" : " app" ,
5
+ "workspaceFolder" : " /workspace" ,
6
+ "customizations" : {
7
+ "vscode" : {
8
+ "extensions" : [
9
+ " shopify.ruby-lsp" ,
10
+ " ms-vscode.vscode-json" ,
11
+ " redhat.vscode-yaml"
12
+ ]
13
+ }
14
+ },
15
+ "forwardPorts" : [3000 , 5173 ],
16
+ "postCreateCommand" : " bin/setup" ,
17
+ "remoteUser" : " user"
18
+ }
Original file line number Diff line number Diff line change
1
+ services :
2
+ app :
3
+ build :
4
+ context : ..
5
+ dockerfile : .devcontainer/Dockerfile
6
+ volumes :
7
+ - ..:/workspace:cached
8
+ - gem_cache:/usr/local/bundle
9
+ command : sleep infinity
10
+ environment :
11
+ - RAILS_ENV=development
12
+ working_dir : /workspace
13
+
14
+ volumes :
15
+ gem_cache :
Original file line number Diff line number Diff line change 2
2
# Requiring logger fixes an issue between concurrent-ruby and activesupport in Rails < 7.1
3
3
# https://github.com/rails/rails/issues/54260
4
4
require 'logger'
5
- ENV [ 'RAILS_ENV' ] || = 'test'
5
+ ENV [ 'RAILS_ENV' ] = 'test'
6
6
7
7
require File . expand_path ( '../dummy/config/environment' , __FILE__ )
8
8
You can’t perform that action at this time.
0 commit comments