-
Notifications
You must be signed in to change notification settings - Fork 7
Expand file tree
/
Copy pathdevcontainer.json
More file actions
163 lines (163 loc) · 5.22 KB
/
Copy pathdevcontainer.json
File metadata and controls
163 lines (163 loc) · 5.22 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
// 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-rails-postgres
{
"name": "ruby-on-rails",
"dockerComposeFile": "docker-compose.yml",
"service": "app",
"workspaceFolder": "/workspaces/${localWorkspaceFolderBasename}",
// Features to add to the dev container. More info: https://containers.dev/features.
"features": {
"ghcr.io/devcontainers/features/node": {},
"ghcr.io/devcontainers/features/docker-in-docker": {},
"ghcr.io/rails/devcontainer/features/activestorage": {},
"ghcr.io/rails/devcontainer/features/postgres-client": {},
"ghcr.io/jungaretti/features/vim": {},
"ghcr.io/devcontainers/features/common-utils:latest": {
"installOhMyZsh": false, // For more defailts: https://github.com/devcontainers/features/issues/1035.
"installOhMyZshConfig": false,
"configureZshAsDefaultShell": true
}
},
// Use 'forwardPorts' to make a list of ports inside the container available locally.
// This can be used to network with other containers or the host.
"forwardPorts": [
3000,
5432,
6379,
11211,
7700
],
// Use 'postCreateCommand' to run commands after the container is created.
"postCreateCommand": ".devcontainer/setup.sh",
// Configure tool-specific properties.
"customizations": {
"vscode": {
"settings": {
"workbench": {
"iconTheme": "vscode-icons"
},
"editor": {
"formatOnSave": true,
"quickSuggestions": {
"strings": "on"
}
},
"files": {
"associations": {
"*.css": "tailwindcss"
}
},
"[ruby]": {
"editor": {
"defaultFormatter": "Shopify.ruby-lsp",
"formatOnSave": true,
"tabSize": 2,
"insertSpaces": true,
"semanticHighlighting.enabled": true,
"formatOnType": true
}
},
"[erb]": {
"editor": {
"formatOnSave": false
}
},
"rubyLsp": {
"rubyVersionManager": "rbenv",
"formatter": "rubocop"
},
"railsI18n": {
"localeFilePattern": "config/locales/**/*.yml",
"priorityOfLocales": [
"ar"
]
},
"tailwindCSS": {
"includeLanguages": {
"plaintext": "html"
}
},
"erb-formatter": {
"lineLength": 240,
"commandPath": "/home/vscode/.rbenv/versions/3.3.4/bin/erb-formatter"
},
"erb": {
"erb-lint": {
"onSave": false
}
},
"emeraldwalk.runonsave": {
"commands": [
{
"match": "(?<!\\.json)\\.erb$",
"cmd": "tempfile=$(mktemp);\
cat ${file} > $tempfile;\
rustywind --write $tempfile;\
rustywind --write --custom-regex \"class=\\\"([^\\\"]+)\\\"\" $tempfile;\
rustywind --write --custom-regex \"class:\\s+\\\"([^\\\"]+)\\\"\" $tempfile;\
rustywind --write --custom-regex \"class:\\s+\\'([^\\']+)\\'\" $tempfile;\
erb-formatter --write --print-width 240 $tempfile;\
erblint --autocorrect $tempfile;\
mv $tempfile ${file};"
},
{
"match": ".*locales.*\\.yml$",
"cmd": "i18n-tasks normalize"
},
{
"match": "\\.css$",
"cmd": "rustywind --write --custom-regex \"@apply ([_a-zA.-Z0-9-:\\[\\] ]+)( !important)?;\" ${file}"
}
]
},
"livePreview": {
"portNumber": 9620
},
"sqltools.connections": [
{
"name": "Rails Development Database",
"driver": "PostgreSQL",
"previewLimit": 50,
"server": "db",
"port": 5432,
// update this to match config/database.yml
"database": "ruby_on_rails_development",
"username": "postgres",
"password": "postgres"
},
{
"name": "Rails Test Database",
"driver": "PostgreSQL",
"previewLimit": 50,
"server": "db",
"port": 5432,
// update this to match config/database.yml
"database": "ruby_on_rails_test",
"username": "postgres",
"password": "postgres"
}
]
},
"extensions": [
"Postman.postman-for-vscode",
"aki77.rails-db-schema",
"aki77.rails-i18n",
"aki77.rails-partial",
"bradlc.vscode-tailwindcss",
"bung87.vscode-gemfile",
"eamodio.gitlens",
"elia.erb-formatter",
"emeraldwalk.RunOnSave",
"manuelpuyol.erb-linter",
"marcoroth.stimulus-lsp",
"ms-vscode.live-server",
"mtxr.sqltools",
"mtxr.sqltools-driver-pg",
"vscode-icons-team.vscode-icons",
"waderyan.gitblame"
]
}
}
// Uncomment to connect as root instead. More info: https://aka.ms/dev-containers-non-root.
// "remoteUser": "root"
}