From 22b1f708e3874a8d2935af14a71d9bcae5c2c4fe Mon Sep 17 00:00:00 2001 From: "Ian J. MacIntosh" Date: Fri, 25 Oct 2024 02:18:40 +0000 Subject: [PATCH 01/24] Start dev container config --- .devcontainer/devcontainer.json | 11 +++++++++++ 1 file changed, 11 insertions(+) create mode 100644 .devcontainer/devcontainer.json diff --git a/.devcontainer/devcontainer.json b/.devcontainer/devcontainer.json new file mode 100644 index 0000000000..156b430a41 --- /dev/null +++ b/.devcontainer/devcontainer.json @@ -0,0 +1,11 @@ +{ + "image": "mcr.microsoft.com/devcontainers/universal:2", + "features": { + "ghcr.io/itsmechlark/features/postgresql:1": { + "version": "latest" + }, + "ghcr.io/itsmechlark/features/redis-server:1": { + "version": "latest" + } + } +} \ No newline at end of file From d6cf003260139fc3eb42b80384d18a4be959c1fe Mon Sep 17 00:00:00 2001 From: "Ian J. MacIntosh" Date: Fri, 25 Oct 2024 21:15:45 +0000 Subject: [PATCH 02/24] Follow instructions from containers.dev https://containers.dev/guide/dockerfile --- .devcontainer/devcontainer.json | 14 ++++---------- 1 file changed, 4 insertions(+), 10 deletions(-) diff --git a/.devcontainer/devcontainer.json b/.devcontainer/devcontainer.json index 156b430a41..4575724dc5 100644 --- a/.devcontainer/devcontainer.json +++ b/.devcontainer/devcontainer.json @@ -1,11 +1,5 @@ { - "image": "mcr.microsoft.com/devcontainers/universal:2", - "features": { - "ghcr.io/itsmechlark/features/postgresql:1": { - "version": "latest" - }, - "ghcr.io/itsmechlark/features/redis-server:1": { - "version": "latest" - } - } -} \ No newline at end of file + "dockerComposeFile": "docker-compose.yml", + "service": "devcontainer", + "workspaceFolder": "/workspaces/${localWorkspaceFolderBasename}" +} From 401e26f932091b957a6fed2320aa6b3675b3bdf3 Mon Sep 17 00:00:00 2001 From: "Ian J. MacIntosh" Date: Fri, 25 Oct 2024 21:37:29 +0000 Subject: [PATCH 03/24] Add docker compose for postgres --- .devcontainer/docker-compose.yml | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) create mode 100644 .devcontainer/docker-compose.yml diff --git a/.devcontainer/docker-compose.yml b/.devcontainer/docker-compose.yml new file mode 100644 index 0000000000..8071e681b9 --- /dev/null +++ b/.devcontainer/docker-compose.yml @@ -0,0 +1,21 @@ +version: '3.8' +services: + devcontainer: + image: mcr.microsoft.com/devcontainers/universal:2 + volumes: + - ../..:/workspaces:cached + network_mode: service:db + command: sleep infinity + + db: + image: postgres:latest + restart: unless-stopped + volumes: + - postgres-data:/var/lib/postgresql/data + environment: + POSTGRES_PASSWORD: postgres + POSTGRES_USER: postgres + POSTGRES_DB: postgres + +volumes: + postgres-data: From 30d076eef01c8ee78f99792fc2108e657355ea13 Mon Sep 17 00:00:00 2001 From: "Ian J. MacIntosh" Date: Sun, 27 Oct 2024 03:10:05 +0000 Subject: [PATCH 04/24] Remove unnecessary newline --- .devcontainer/devcontainer.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.devcontainer/devcontainer.json b/.devcontainer/devcontainer.json index 4575724dc5..44958924c5 100644 --- a/.devcontainer/devcontainer.json +++ b/.devcontainer/devcontainer.json @@ -2,4 +2,4 @@ "dockerComposeFile": "docker-compose.yml", "service": "devcontainer", "workspaceFolder": "/workspaces/${localWorkspaceFolderBasename}" -} +} \ No newline at end of file From d45b7f6fd98b026eef6d375f393f127ffcd6fcbb Mon Sep 17 00:00:00 2001 From: "Ian J. MacIntosh" Date: Sun, 27 Oct 2024 03:17:38 +0000 Subject: [PATCH 05/24] Add redis and change network mode https://github.com/luizkowalski/devcontainer-rails/blob/main/.devcontainer/docker-compose.yml --- .devcontainer/docker-compose.yml | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/.devcontainer/docker-compose.yml b/.devcontainer/docker-compose.yml index 8071e681b9..4628f44d0e 100644 --- a/.devcontainer/docker-compose.yml +++ b/.devcontainer/docker-compose.yml @@ -4,7 +4,6 @@ services: image: mcr.microsoft.com/devcontainers/universal:2 volumes: - ../..:/workspaces:cached - network_mode: service:db command: sleep infinity db: @@ -16,6 +15,13 @@ services: POSTGRES_PASSWORD: postgres POSTGRES_USER: postgres POSTGRES_DB: postgres + + redis: + image: redis:7.2-alpine + restart: unless-stopped + volumes: + - redis-data:/data volumes: postgres-data: + redis-data: From e8ce8301b6c4e8429b22a169a2515a33c2565d42 Mon Sep 17 00:00:00 2001 From: "Ian J. MacIntosh" Date: Sun, 27 Oct 2024 03:58:05 +0000 Subject: [PATCH 06/24] Revert "Add redis and change network mode" This reverts commit d45b7f6fd98b026eef6d375f393f127ffcd6fcbb. --- .devcontainer/docker-compose.yml | 8 +------- 1 file changed, 1 insertion(+), 7 deletions(-) diff --git a/.devcontainer/docker-compose.yml b/.devcontainer/docker-compose.yml index 4628f44d0e..8071e681b9 100644 --- a/.devcontainer/docker-compose.yml +++ b/.devcontainer/docker-compose.yml @@ -4,6 +4,7 @@ services: image: mcr.microsoft.com/devcontainers/universal:2 volumes: - ../..:/workspaces:cached + network_mode: service:db command: sleep infinity db: @@ -15,13 +16,6 @@ services: POSTGRES_PASSWORD: postgres POSTGRES_USER: postgres POSTGRES_DB: postgres - - redis: - image: redis:7.2-alpine - restart: unless-stopped - volumes: - - redis-data:/data volumes: postgres-data: - redis-data: From 118165e981d0130f6b41f7f2eb4f30791873903f Mon Sep 17 00:00:00 2001 From: "Ian J. MacIntosh" Date: Sun, 27 Oct 2024 16:18:50 +0000 Subject: [PATCH 07/24] Attach postgres service to devcontainer's network interface --- .devcontainer/docker-compose.yml | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/.devcontainer/docker-compose.yml b/.devcontainer/docker-compose.yml index 8071e681b9..9bf3d47fff 100644 --- a/.devcontainer/docker-compose.yml +++ b/.devcontainer/docker-compose.yml @@ -4,7 +4,6 @@ services: image: mcr.microsoft.com/devcontainers/universal:2 volumes: - ../..:/workspaces:cached - network_mode: service:db command: sleep infinity db: @@ -16,6 +15,9 @@ services: POSTGRES_PASSWORD: postgres POSTGRES_USER: postgres POSTGRES_DB: postgres + network_mode: service:devcontainer + depends_on: + - devcontainer volumes: postgres-data: From af4ffcd5ff24ea68e28606eb9304adac2028f0ec Mon Sep 17 00:00:00 2001 From: "Ian J. MacIntosh" Date: Sun, 27 Oct 2024 16:23:21 +0000 Subject: [PATCH 08/24] Install postgresql-client during setup --- .devcontainer/Dockerfile | 3 +++ .devcontainer/docker-compose.yml | 4 +++- 2 files changed, 6 insertions(+), 1 deletion(-) create mode 100644 .devcontainer/Dockerfile diff --git a/.devcontainer/Dockerfile b/.devcontainer/Dockerfile new file mode 100644 index 0000000000..89acedcc91 --- /dev/null +++ b/.devcontainer/Dockerfile @@ -0,0 +1,3 @@ +FROM mcr.microsoft.com/devcontainers/universal:2 + +RUN apt-get update && apt-get install -y postgresql-client \ No newline at end of file diff --git a/.devcontainer/docker-compose.yml b/.devcontainer/docker-compose.yml index 9bf3d47fff..d1498eecc6 100644 --- a/.devcontainer/docker-compose.yml +++ b/.devcontainer/docker-compose.yml @@ -1,7 +1,9 @@ version: '3.8' services: devcontainer: - image: mcr.microsoft.com/devcontainers/universal:2 + build: + context: . + dockerfile: Dockerfile volumes: - ../..:/workspaces:cached command: sleep infinity From fbec2613e851d118ee316c4d8696ac30a6c5887e Mon Sep 17 00:00:00 2001 From: "Ian J. MacIntosh" Date: Sun, 27 Oct 2024 17:17:55 +0000 Subject: [PATCH 09/24] Add redis container to setup --- .devcontainer/docker-compose.yml | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/.devcontainer/docker-compose.yml b/.devcontainer/docker-compose.yml index d1498eecc6..a72f07baf9 100644 --- a/.devcontainer/docker-compose.yml +++ b/.devcontainer/docker-compose.yml @@ -21,5 +21,18 @@ services: depends_on: - devcontainer + redis: + image: redis:latest + command: redis-server + volumes: + - redis:/var/lib/redis + - redis-config:/usr/local/etc/redis/redis.conf + network_mode: service:devcontainer + depends_on: + - devcontainer + + volumes: postgres-data: + redis: + redis-config: From 38730ecf39fdc20d480835f19ef0c35650c87cb0 Mon Sep 17 00:00:00 2001 From: "Ian J. MacIntosh" Date: Sun, 27 Oct 2024 18:32:42 +0000 Subject: [PATCH 10/24] Add documentation for codespaces setup --- .devcontainer/README.md | 28 ++++++++++++++++++++++++++++ 1 file changed, 28 insertions(+) create mode 100644 .devcontainer/README.md diff --git a/.devcontainer/README.md b/.devcontainer/README.md new file mode 100644 index 0000000000..4e89669cf1 --- /dev/null +++ b/.devcontainer/README.md @@ -0,0 +1,28 @@ +These files enable you to quickly get up and running with The Odin Project in a dev container + +You'll still to do some setup after starting your dev container: +```bash + # Install ruby-3.3.5 for rvm +rvm install "ruby-3.3.5" + +# Remove a tool that will cause build issues +gem uninstall -i /usr/local/rvm/rubies/ruby-3.3.5/lib/ruby/gems/3.3.0 gem-wrappers + +# Install required gems +bundle install + +# Install required JS dependencies +yarn install + +# Install Chrome (for running tests) +wget https://dl.google.com/linux/direct/google-chrome-stable_current_amd64.deb +sudo apt install ./google-chrome-stable_current_amd64.deb -y +rm ./google-chrome-stable_current_amd64.deb + +# Set up your database +rails db:create +rails db:environment:set RAILS_ENV=development # I think I can set this in the docker-compose +rails db:schema:load +``` + +> Note: If you think some of this could be automated, you're probably right! Open a pull request with those changes that can give other engineers a turbo boost! \ No newline at end of file From 215b6e0e5fe3bfa4f523b70d97ae976c874fd85e Mon Sep 17 00:00:00 2001 From: "Ian J. MacIntosh" Date: Sun, 27 Oct 2024 18:51:02 +0000 Subject: [PATCH 11/24] Clarify docs for dev container config --- .devcontainer/README.md | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/.devcontainer/README.md b/.devcontainer/README.md index 4e89669cf1..bd45b047b3 100644 --- a/.devcontainer/README.md +++ b/.devcontainer/README.md @@ -1,4 +1,5 @@ -These files enable you to quickly get up and running with The Odin Project in a dev container + +These files in `/.devcontainer` let you use services like GitHub Codespaces to quickly get up and running with The Odin Project You'll still to do some setup after starting your dev container: ```bash @@ -25,4 +26,4 @@ rails db:environment:set RAILS_ENV=development # I think I can set this in the d rails db:schema:load ``` -> Note: If you think some of this could be automated, you're probably right! Open a pull request with those changes that can give other engineers a turbo boost! \ No newline at end of file +> Note: If you think some of this could be automated, you're probably right. Open a pull request with those changes that can give other engineers a turbo boost! \ No newline at end of file From 6df017d948e8e07e3eb5b6edc2809b69e73314c7 Mon Sep 17 00:00:00 2001 From: "Ian J. MacIntosh" Date: Sun, 27 Oct 2024 18:51:20 +0000 Subject: [PATCH 12/24] Stop installing psql unnecessarily If someone needs it, they can install it on their own --- .devcontainer/Dockerfile | 2 -- 1 file changed, 2 deletions(-) diff --git a/.devcontainer/Dockerfile b/.devcontainer/Dockerfile index 89acedcc91..bd2845112b 100644 --- a/.devcontainer/Dockerfile +++ b/.devcontainer/Dockerfile @@ -1,3 +1 @@ FROM mcr.microsoft.com/devcontainers/universal:2 - -RUN apt-get update && apt-get install -y postgresql-client \ No newline at end of file From bbe61c2a9d5103657c40ad8d47bda1bfa6c9e21a Mon Sep 17 00:00:00 2001 From: "Ian J. MacIntosh" Date: Sun, 27 Oct 2024 19:04:01 +0000 Subject: [PATCH 13/24] Update env setup step in docs Also correct the install instructions for Chrome --- .devcontainer/README.md | 16 ++++++++++++---- 1 file changed, 12 insertions(+), 4 deletions(-) diff --git a/.devcontainer/README.md b/.devcontainer/README.md index bd45b047b3..59984e3720 100644 --- a/.devcontainer/README.md +++ b/.devcontainer/README.md @@ -15,14 +15,22 @@ bundle install # Install required JS dependencies yarn install +# Prepare .env +cp env.sample .env + +# Manually update .env with postgres username and password; default is "postgres" for both +# POSTGRES_USERNAME: 'postgres' +# POSTGRES_PASSWORD: 'postgres + # Install Chrome (for running tests) -wget https://dl.google.com/linux/direct/google-chrome-stable_current_amd64.deb -sudo apt install ./google-chrome-stable_current_amd64.deb -y -rm ./google-chrome-stable_current_amd64.deb +wget https://dl.google.com/linux/direct/google-chrome-stable_current_amd64.deb && \ + sudo apt update && \ + sudo apt install ./google-chrome-stable_current_amd64.deb -y && \ + rm ./google-chrome-stable_current_amd64.deb # Set up your database rails db:create -rails db:environment:set RAILS_ENV=development # I think I can set this in the docker-compose +rails db:environment:set RAILS_ENV=development rails db:schema:load ``` From 0530ba235a9616ac12c702c026ac512d30e407c2 Mon Sep 17 00:00:00 2001 From: "Ian J. MacIntosh" Date: Mon, 28 Oct 2024 00:34:36 +0000 Subject: [PATCH 14/24] Add setup script Set postgres credentials --- .devcontainer/docker-compose.yml | 4 ++++ .devcontainer/postCreate.sh | 1 + 2 files changed, 5 insertions(+) create mode 100644 .devcontainer/postCreate.sh diff --git a/.devcontainer/docker-compose.yml b/.devcontainer/docker-compose.yml index a72f07baf9..ad9b7c31c7 100644 --- a/.devcontainer/docker-compose.yml +++ b/.devcontainer/docker-compose.yml @@ -7,6 +7,10 @@ services: volumes: - ../..:/workspaces:cached command: sleep infinity + environment: + POSTGRES_PASSWORD: postgres + POSTGRES_USERNAME: postgres + postCreateCommand: "bash -i -c '. ./initialSetup.sh'" db: image: postgres:latest diff --git a/.devcontainer/postCreate.sh b/.devcontainer/postCreate.sh new file mode 100644 index 0000000000..581fd10ade --- /dev/null +++ b/.devcontainer/postCreate.sh @@ -0,0 +1 @@ +export TEST=helloworld \ No newline at end of file From 5556d61476acbdf49e46ddff010694eaaa879cc4 Mon Sep 17 00:00:00 2001 From: "Ian J. MacIntosh" Date: Mon, 28 Oct 2024 00:51:39 +0000 Subject: [PATCH 15/24] Add environment vars for dev setup --- .devcontainer/docker-compose.yml | 1 - 1 file changed, 1 deletion(-) diff --git a/.devcontainer/docker-compose.yml b/.devcontainer/docker-compose.yml index ad9b7c31c7..bae2101bab 100644 --- a/.devcontainer/docker-compose.yml +++ b/.devcontainer/docker-compose.yml @@ -10,7 +10,6 @@ services: environment: POSTGRES_PASSWORD: postgres POSTGRES_USERNAME: postgres - postCreateCommand: "bash -i -c '. ./initialSetup.sh'" db: image: postgres:latest From 0d9691df19ee045717ab514d2bdb11f54ef3eb22 Mon Sep 17 00:00:00 2001 From: "Ian J. MacIntosh" Date: Mon, 28 Oct 2024 01:38:21 +0000 Subject: [PATCH 16/24] Update dependency script --- .devcontainer/postCreate.sh | 1 - 1 file changed, 1 deletion(-) delete mode 100644 .devcontainer/postCreate.sh diff --git a/.devcontainer/postCreate.sh b/.devcontainer/postCreate.sh deleted file mode 100644 index 581fd10ade..0000000000 --- a/.devcontainer/postCreate.sh +++ /dev/null @@ -1 +0,0 @@ -export TEST=helloworld \ No newline at end of file From e038b55823107e29b0c8bc940c79d7dd3862fb6b Mon Sep 17 00:00:00 2001 From: "Ian J. MacIntosh" Date: Mon, 28 Oct 2024 01:48:07 +0000 Subject: [PATCH 17/24] Add dependency install script --- .devcontainer/install-dependencies.sh | 32 +++++++++++++++++++++++++++ 1 file changed, 32 insertions(+) create mode 100644 .devcontainer/install-dependencies.sh diff --git a/.devcontainer/install-dependencies.sh b/.devcontainer/install-dependencies.sh new file mode 100644 index 0000000000..e05b3d7069 --- /dev/null +++ b/.devcontainer/install-dependencies.sh @@ -0,0 +1,32 @@ +# Install ruby-3.3.5 for rvm +rvm install "ruby-3.3.5" + +# Remove a tool that will cause build issues +gem uninstall -i /usr/local/rvm/rubies/ruby-3.3.5/lib/ruby/gems/3.3.0 gem-wrappers + +# Install rails +gem install rails + +# Install required gems +bundle install + +# Install required JS dependencies +yarn install + +# Prepare .env +cp env.sample .env + +# Manually update .env with postgres username and password; default is "postgres" for both +# POSTGRES_USERNAME: 'postgres' +# POSTGRES_PASSWORD: 'postgres + +# Install Chrome (for running tests) +wget https://dl.google.com/linux/direct/google-chrome-stable_current_amd64.deb && \ + sudo apt update && \ + sudo apt install ./google-chrome-stable_current_amd64.deb -y && \ + rm ./google-chrome-stable_current_amd64.deb + +# Set up your database +rails db:create +rails db:environment:set RAILS_ENV=development +rails db:schema:load \ No newline at end of file From a037a128736d79df6511881f81349f33e8f920c7 Mon Sep 17 00:00:00 2001 From: "Ian J. MacIntosh" Date: Mon, 28 Oct 2024 02:13:33 +0000 Subject: [PATCH 18/24] Use correct Ruby management tool --- .devcontainer/install-dependencies.sh | 11 ++++------- 1 file changed, 4 insertions(+), 7 deletions(-) diff --git a/.devcontainer/install-dependencies.sh b/.devcontainer/install-dependencies.sh index e05b3d7069..00e101a1bd 100644 --- a/.devcontainer/install-dependencies.sh +++ b/.devcontainer/install-dependencies.sh @@ -1,11 +1,8 @@ -# Install ruby-3.3.5 for rvm -rvm install "ruby-3.3.5" +# Install ruby-3.3.5 for rbenv +rbenv install 3.3.5 --verbose -# Remove a tool that will cause build issues -gem uninstall -i /usr/local/rvm/rubies/ruby-3.3.5/lib/ruby/gems/3.3.0 gem-wrappers - -# Install rails -gem install rails +# Remove a tool that will cause build issues... is this even a thing if I'm not using rvm? +# gem uninstall -i /usr/local/rvm/rubies/ruby-3.3.5/lib/ruby/gems/3.3.0 gem-wrappers # Install required gems bundle install From 68f50a9a62252e3319bfbe86ea80ba334bc3471e Mon Sep 17 00:00:00 2001 From: "Ian J. MacIntosh" Date: Mon, 28 Oct 2024 02:39:52 +0000 Subject: [PATCH 19/24] Go back to using rvm rbenv and rvm cannot live side-by-side --- .devcontainer/install-dependencies.sh | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/.devcontainer/install-dependencies.sh b/.devcontainer/install-dependencies.sh index 00e101a1bd..57b65386db 100644 --- a/.devcontainer/install-dependencies.sh +++ b/.devcontainer/install-dependencies.sh @@ -1,8 +1,8 @@ -# Install ruby-3.3.5 for rbenv -rbenv install 3.3.5 --verbose +# Install ruby-3.3.5 for rvm +rvm install ruby-3.3.5 -# Remove a tool that will cause build issues... is this even a thing if I'm not using rvm? -# gem uninstall -i /usr/local/rvm/rubies/ruby-3.3.5/lib/ruby/gems/3.3.0 gem-wrappers +# Remove tooling that causes build issues +gem uninstall -i /usr/local/rvm/rubies/ruby-3.3.5/lib/ruby/gems/3.3.0 gem-wrappers # Install required gems bundle install From d08563f3a16adf338400ed35a09ebd005e943ea0 Mon Sep 17 00:00:00 2001 From: "Ian J. MacIntosh" Date: Mon, 28 Oct 2024 13:07:50 +0000 Subject: [PATCH 20/24] Set ruby 3.3.5 as default Also remove unnecessary comment about .env --- .devcontainer/install-dependencies.sh | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/.devcontainer/install-dependencies.sh b/.devcontainer/install-dependencies.sh index 57b65386db..caa9a01cde 100644 --- a/.devcontainer/install-dependencies.sh +++ b/.devcontainer/install-dependencies.sh @@ -1,5 +1,5 @@ -# Install ruby-3.3.5 for rvm -rvm install ruby-3.3.5 +# Install and use ruby 3.3.5 as default; our Docker image uses rvm +rvm install 3.3.5 --default # Remove tooling that causes build issues gem uninstall -i /usr/local/rvm/rubies/ruby-3.3.5/lib/ruby/gems/3.3.0 gem-wrappers @@ -13,10 +13,6 @@ yarn install # Prepare .env cp env.sample .env -# Manually update .env with postgres username and password; default is "postgres" for both -# POSTGRES_USERNAME: 'postgres' -# POSTGRES_PASSWORD: 'postgres - # Install Chrome (for running tests) wget https://dl.google.com/linux/direct/google-chrome-stable_current_amd64.deb && \ sudo apt update && \ From 507771c499d519d007daa62e2c72d943ea506c82 Mon Sep 17 00:00:00 2001 From: "Ian J. MacIntosh" Date: Mon, 28 Oct 2024 13:33:27 +0000 Subject: [PATCH 21/24] Run setup script when creating dev container Also add some instructions for how to get started --- .devcontainer/devcontainer.json | 3 ++- .devcontainer/install-dependencies.sh | 13 ++++++++++++- 2 files changed, 14 insertions(+), 2 deletions(-) diff --git a/.devcontainer/devcontainer.json b/.devcontainer/devcontainer.json index 44958924c5..e72e06a23e 100644 --- a/.devcontainer/devcontainer.json +++ b/.devcontainer/devcontainer.json @@ -1,5 +1,6 @@ { "dockerComposeFile": "docker-compose.yml", "service": "devcontainer", - "workspaceFolder": "/workspaces/${localWorkspaceFolderBasename}" + "workspaceFolder": "/workspaces/${localWorkspaceFolderBasename}", + "onCreateCommand": "sh .devcontainer/install-dependencies.sh" } \ No newline at end of file diff --git a/.devcontainer/install-dependencies.sh b/.devcontainer/install-dependencies.sh index caa9a01cde..aa7224bfb6 100644 --- a/.devcontainer/install-dependencies.sh +++ b/.devcontainer/install-dependencies.sh @@ -22,4 +22,15 @@ wget https://dl.google.com/linux/direct/google-chrome-stable_current_amd64.deb & # Set up your database rails db:create rails db:environment:set RAILS_ENV=development -rails db:schema:load \ No newline at end of file +rails db:schema:load + +# Remind user how to get started +echo +echo To get started you can run your tests by running this command: +echo +echo bin/rspec +echo +echo ...or you can run the web site by running this command: +echo +echo bin/dev +echo \ No newline at end of file From 8083fc5f051df1df26f305ae969401629942a4ad Mon Sep 17 00:00:00 2001 From: "Ian J. MacIntosh" Date: Mon, 28 Oct 2024 14:09:18 +0000 Subject: [PATCH 22/24] Remove deprecated attribute --- .devcontainer/docker-compose.yml | 1 - 1 file changed, 1 deletion(-) diff --git a/.devcontainer/docker-compose.yml b/.devcontainer/docker-compose.yml index bae2101bab..a3cf4b14e9 100644 --- a/.devcontainer/docker-compose.yml +++ b/.devcontainer/docker-compose.yml @@ -1,4 +1,3 @@ -version: '3.8' services: devcontainer: build: From 62b683d5ab4a0d1da2108f8dab77ba3b31d3dbb8 Mon Sep 17 00:00:00 2001 From: "Ian J. MacIntosh" Date: Mon, 28 Oct 2024 14:10:08 +0000 Subject: [PATCH 23/24] Explicitly set Ruby using documented commands Maybe the failures from before were due to bad syntax? --- .devcontainer/install-dependencies.sh | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/.devcontainer/install-dependencies.sh b/.devcontainer/install-dependencies.sh index aa7224bfb6..8787ce9398 100644 --- a/.devcontainer/install-dependencies.sh +++ b/.devcontainer/install-dependencies.sh @@ -1,5 +1,9 @@ # Install and use ruby 3.3.5 as default; our Docker image uses rvm -rvm install 3.3.5 --default +rvm install 3.3.5 +rvm use 3.3.5 + +# Display current ruby version (for logging) +ruby -v # Remove tooling that causes build issues gem uninstall -i /usr/local/rvm/rubies/ruby-3.3.5/lib/ruby/gems/3.3.0 gem-wrappers From 7b3e69b7c7732b04c7d971ecd69bc13545021d75 Mon Sep 17 00:00:00 2001 From: "Ian J. MacIntosh" Date: Mon, 28 Oct 2024 14:10:36 +0000 Subject: [PATCH 24/24] Run setup in interactive mode (docs insist) --- .devcontainer/devcontainer.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.devcontainer/devcontainer.json b/.devcontainer/devcontainer.json index e72e06a23e..0a76f23d6a 100644 --- a/.devcontainer/devcontainer.json +++ b/.devcontainer/devcontainer.json @@ -2,5 +2,5 @@ "dockerComposeFile": "docker-compose.yml", "service": "devcontainer", "workspaceFolder": "/workspaces/${localWorkspaceFolderBasename}", - "onCreateCommand": "sh .devcontainer/install-dependencies.sh" + "onCreateCommand": "bash -i .devcontainer/install-dependencies.sh" } \ No newline at end of file