-
Notifications
You must be signed in to change notification settings - Fork 336
Expand file tree
/
Copy pathdevcontainer.json
More file actions
44 lines (39 loc) · 1.07 KB
/
devcontainer.json
File metadata and controls
44 lines (39 loc) · 1.07 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
{
"name": "MERN Stack Example",
"dockerComposeFile": "docker-compose.yml",
"service": "app",
"workspaceFolder": "/workspaces/${localWorkspaceFolderBasename}",
"customizations": {
"vscode": {
"extensions": [
"mongodb.mongodb-vscode"
]
}
},
"forwardPorts": [5050, 5173, 27017],
"portsAttributes": {
"5050": {
"label": "Express API",
"onAutoForward": "notify"
},
"5173": {
"label": "React Dev Server",
"onAutoForward": "openPreview"
},
"27017": {
"label": "MongoDB",
"onAutoForward": "silent"
}
},
"postCreateCommand": "cd mern/server && npm ci && cd ../client && npm ci",
"postStartCommand": "bash .devcontainer/startup.sh",
// this will open 3 bash sessions, each one running the specified command
"postAttachCommand": {
"server": "cd mern/server && node ./seed.js && npm start",
"client": "cd mern/client && npm run dev -- --host 0.0.0.0",
"portSetup": "sleep 5 && .devcontainer/portSetup.sh"
},
"remoteEnv": {
"ATLAS_URI": "mongodb://localhost:27017/"
}
}