Skip to content

Commit 255c0ce

Browse files
authored
Merge pull request #1676 from ihatov08/mod_devcontainer
devcontainerの設定を修正
2 parents fed81c7 + 7896adb commit 255c0ce

File tree

1 file changed

+12
-11
lines changed

1 file changed

+12
-11
lines changed

.devcontainer/devcontainer.json

+12-11
Original file line numberDiff line numberDiff line change
@@ -3,14 +3,17 @@
33
// Config options: https://github.com/microsoft/vscode-dev-containers/tree/main/containers/ruby
44
{
55
"name": "coderdojo.jp",
6+
"dockerComposeFile": "../docker-compose.yml",
7+
"service": "rails",
8+
"workspaceFolder": "/app",
9+
"overrideCommand": true,
610

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+
},
1417

1518
// Enable learners to choose an affordable spec, starting at minimum one.
1619
//"hostRequirements": {
@@ -21,12 +24,10 @@
2124

2225
"waitFor": "onCreateCommand",
2326
"onCreateCommand": "gem install solargraph -N",
24-
//"onCreateCommand": "",
2527
//# => Solargraph gem not found. Run `gem install solargraph` or update your Gemfile.
2628
"updateContentCommand": "bundle install",
27-
"postCreateCommand": "",
2829
"postAttachCommand": {
29-
"server": "rails server"
30+
"server": "rm -f /app/tmp/pids/server.pid && rails server -b 0.0.0.0"
3031
},
3132
"customizations": {
3233
"codespaces": {
@@ -47,7 +48,7 @@
4748
//"ruby.lint": { "rubocop": true },
4849
//"ruby.intellisense": "rubyLocate",
4950
"editor.tabSize": 2,
50-
"editor.renderWhitespace": false,
51+
"editor.renderWhitespace": "none",
5152
"files.associations": { "*.erb": "erb" },
5253
"emmet.includeLanguages": { "erb": "html" },
5354

0 commit comments

Comments
 (0)