|
3 | 3 | // Config options: https://github.com/microsoft/vscode-dev-containers/tree/main/containers/ruby |
4 | 4 | { |
5 | 5 | "name": "coderdojo.jp", |
| 6 | + "dockerComposeFile": "../docker-compose.yml", |
| 7 | + "service": "rails", |
| 8 | + "workspaceFolder": "/app", |
| 9 | + "overrideCommand": true, |
6 | 10 |
|
7 | | - // Universal is well-customized image for Codespaces: |
8 | | - // https://hub.docker.com/_/microsoft-devcontainers-universal |
9 | | - "image": "mcr.microsoft.com/devcontainers/universal:latest", |
10 | | - |
11 | | - // Use Ruby image if you want to pin Ruby version like '3.2' |
12 | | - // https://github.com/devcontainers/images/tree/main/src/ruby |
13 | | - //"image": "mcr.microsoft.com/devcontainers/ruby:3.0", |
| 11 | + "containerEnv": { |
| 12 | + "DATABASE_USER": "postgres", |
| 13 | + "DATABASE_PASSWORD": "password", |
| 14 | + "DATABASE_HOST": "db", |
| 15 | + "DATABASE_PORT": "5432" |
| 16 | + }, |
14 | 17 |
|
15 | 18 | // Enable learners to choose an affordable spec, starting at minimum one. |
16 | 19 | //"hostRequirements": { |
|
21 | 24 |
|
22 | 25 | "waitFor": "onCreateCommand", |
23 | 26 | "onCreateCommand": "gem install solargraph -N", |
24 | | - //"onCreateCommand": "", |
25 | 27 | //# => Solargraph gem not found. Run `gem install solargraph` or update your Gemfile. |
26 | 28 | "updateContentCommand": "bundle install", |
27 | | - "postCreateCommand": "", |
28 | 29 | "postAttachCommand": { |
29 | | - "server": "rails server" |
| 30 | + "server": "rm -f /app/tmp/pids/server.pid && rails server -b 0.0.0.0" |
30 | 31 | }, |
31 | 32 | "customizations": { |
32 | 33 | "codespaces": { |
|
47 | 48 | //"ruby.lint": { "rubocop": true }, |
48 | 49 | //"ruby.intellisense": "rubyLocate", |
49 | 50 | "editor.tabSize": 2, |
50 | | - "editor.renderWhitespace": false, |
| 51 | + "editor.renderWhitespace": "none", |
51 | 52 | "files.associations": { "*.erb": "erb" }, |
52 | 53 | "emmet.includeLanguages": { "erb": "html" }, |
53 | 54 |
|
|
0 commit comments