Skip to content

Commit

Permalink
feat: create devcontainer
Browse files Browse the repository at this point in the history
  • Loading branch information
luizchaves committed Oct 11, 2024
1 parent 0bfe328 commit 8805b4e
Show file tree
Hide file tree
Showing 59 changed files with 2,790 additions and 53 deletions.
4 changes: 4 additions & 0 deletions .devcontainer/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
ARG VARIANT=20-bullseye
FROM mcr.microsoft.com/vscode/devcontainers/javascript-node:0-${VARIANT}

# RUN npm install -g pnpm
37 changes: 37 additions & 0 deletions .devcontainer/bmi-body-param/devcontainer.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
{
"name": "BMI Query Param",
"build": {
"dockerfile": "../Dockerfile",
"args": {
"VARIANT": "20-bullseye"
}
},

"workspaceFolder": "/workspaces/lp2/public/codes/expressjs/bmi-query-param",

"portsAttributes": {
"3000": {
"label": "Application",
"onAutoForward": "openPreview"
}
},

"forwardPorts": [3000],

"postCreateCommand": "npm install",

"waitFor": "postCreateCommand",

"postAttachCommand": {
"Server": "npm start --host"
},

"customizations": {
"codespaces": {
"openFiles": ["src/index.js"]
},
"vscode": {
"extensions": ["esbenp.prettier-vscode", "humao.rest-client"]
}
}
}
37 changes: 37 additions & 0 deletions .devcontainer/bmi-query-param/devcontainer.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
{
"name": "BMI Body Param",
"build": {
"dockerfile": "../Dockerfile",
"args": {
"VARIANT": "20-bullseye"
}
},

"workspaceFolder": "/workspaces/lp2/public/codes/expressjs/bmi-body-param",

"portsAttributes": {
"3000": {
"label": "Application",
"onAutoForward": "openPreview"
}
},

"forwardPorts": [3000],

"postCreateCommand": "npm install",

"waitFor": "postCreateCommand",

"postAttachCommand": {
"Server": "npm start --host"
},

"customizations": {
"codespaces": {
"openFiles": ["src/index.js"]
},
"vscode": {
"extensions": ["esbenp.prettier-vscode", "humao.rest-client"]
}
}
}
37 changes: 37 additions & 0 deletions .devcontainer/bmi-router-param/devcontainer.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
{
"name": "BMI Router Param",
"build": {
"dockerfile": "../Dockerfile",
"args": {
"VARIANT": "20-bullseye"
}
},

"workspaceFolder": "/workspaces/lp2/public/codes/expressjs/bmi-router-param",

"portsAttributes": {
"3000": {
"label": "Application",
"onAutoForward": "openPreview"
}
},

"forwardPorts": [3000],

"postCreateCommand": "npm install",

"waitFor": "postCreateCommand",

"postAttachCommand": {
"Server": "npm start --host"
},

"customizations": {
"codespaces": {
"openFiles": ["src/index.js"]
},
"vscode": {
"extensions": ["esbenp.prettier-vscode", "humao.rest-client"]
}
}
}
23 changes: 23 additions & 0 deletions .devcontainer/devcontainer.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
{
"name": "LP2",
"build": {
"dockerfile": "Dockerfile"
},

"postCreateCommand": "npm install",

"waitFor": "postCreateCommand",

"postAttachCommand": {
"Astro dev": "npm run dev"
},

"customizations": {
"codespaces": {
"openFiles": ["./src/pages/index.mdx"]
},
"vscode": {
"extensions": ["astro-build.astro-vscode", "esbenp.prettier-vscode"]
}
}
}
37 changes: 37 additions & 0 deletions .devcontainer/hello-lang/devcontainer.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
{
"name": "Hello Lang",
"build": {
"dockerfile": "../Dockerfile",
"args": {
"VARIANT": "20-bullseye"
}
},

"workspaceFolder": "/workspaces/lp2/public/codes/expressjs/hello-lang",

"portsAttributes": {
"3000": {
"label": "Application",
"onAutoForward": "openPreview"
}
},

"forwardPorts": [3000],

"postCreateCommand": "npm install",

"waitFor": "postCreateCommand",

"postAttachCommand": {
"Server": "npm start --host"
},

"customizations": {
"codespaces": {
"openFiles": ["src/index.js"]
},
"vscode": {
"extensions": ["esbenp.prettier-vscode", "humao.rest-client"]
}
}
}
37 changes: 37 additions & 0 deletions .devcontainer/hello-simple/devcontainer.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
{
"name": "Hello Simple",
"build": {
"dockerfile": "../Dockerfile",
"args": {
"VARIANT": "20-bullseye"
}
},

"workspaceFolder": "/workspaces/lp2/public/codes/expressjs/hello-simple",

"portsAttributes": {
"3000": {
"label": "Application",
"onAutoForward": "openPreview"
}
},

"forwardPorts": [3000],

"postCreateCommand": "npm install",

"waitFor": "postCreateCommand",

"postAttachCommand": {
"Server": "npm start --host"
},

"customizations": {
"codespaces": {
"openFiles": ["src/index.js"]
},
"vscode": {
"extensions": ["esbenp.prettier-vscode", "humao.rest-client"]
}
}
}
37 changes: 37 additions & 0 deletions .devcontainer/invest-app-api-back-end/devcontainer.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
{
"name": "Invest App API Back-end",
"build": {
"dockerfile": "../Dockerfile",
"args": {
"VARIANT": "20-bullseye"
}
},

"workspaceFolder": "/workspaces/lp2/public/codes/expressjs/invest-app-api-back-end",

"portsAttributes": {
"3000": {
"label": "Application",
"onAutoForward": "openPreview"
}
},

"forwardPorts": [3000],

"postCreateCommand": "npm install",

"waitFor": "postCreateCommand",

"postAttachCommand": {
"Server": "npm start --host"
},

"customizations": {
"codespaces": {
"openFiles": ["src/index.js"]
},
"vscode": {
"extensions": ["esbenp.prettier-vscode", "humao.rest-client"]
}
}
}
37 changes: 37 additions & 0 deletions .devcontainer/invest-app-api/devcontainer.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
{
"name": "Invest App API",
"build": {
"dockerfile": "../Dockerfile",
"args": {
"VARIANT": "20-bullseye"
}
},

"workspaceFolder": "/workspaces/lp2/public/codes/expressjs/invest-app-api",

"portsAttributes": {
"3000": {
"label": "Application",
"onAutoForward": "openPreview"
}
},

"forwardPorts": [3000],

"postCreateCommand": "npm install",

"waitFor": "postCreateCommand",

"postAttachCommand": {
"Server": "npm start --host"
},

"customizations": {
"codespaces": {
"openFiles": ["src/index.js"]
},
"vscode": {
"extensions": ["esbenp.prettier-vscode", "humao.rest-client"]
}
}
}
59 changes: 59 additions & 0 deletions .devcontainer/invest-app-auth/devcontainer.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,59 @@
{
"name": "Invest App Auth",
"build": {
"dockerfile": "../Dockerfile",
"args": {
"VARIANT": "20-bullseye"
}
},

"workspaceFolder": "/workspaces/lp2/public/codes/expressjs/invest-app-auth",

"portsAttributes": {
"3000": {
"label": "Application",
"onAutoForward": "openPreview"
}
},

"forwardPorts": [3000],

"postCreateCommand": "npm install && cp .env.example .env",

"waitFor": "postCreateCommand",

"postAttachCommand": {
"Server": "npm start --host"
},

// "remoteUser": "node",

"containerEnv": {
"DATABASE_URL": "file:./dev.db"
},

"customizations": {
"codespaces": {
"openFiles": ["src/index.js"]
},
"vscode": {
"settings": {
"editor.defaultFormatter": "esbenp.prettier-vscode",
"editor.formatOnSave": true,
// "editor.codeActionsOnSave": {
// "source.fixAll.eslint": true
// },
"[prisma]": {
"editor.defaultFormatter": "prisma.prisma"
},
},
"extensions": [
// "dbaeumer.vscode-eslint",
"esbenp.prettier-vscode",
"humao.rest-client",
"qwtel.sqlite-viewer",
"prisma.prisma"
]
}
}
}
41 changes: 41 additions & 0 deletions .devcontainer/invest-app-db-simple/devcontainer.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
{
"name": "Invest App Database",
"build": {
"dockerfile": "../Dockerfile",
"args": {
"VARIANT": "20-bullseye"
}
},

"workspaceFolder": "/workspaces/lp2/public/codes/expressjs/invest-app-db-simple",

"portsAttributes": {
"3000": {
"label": "Application",
"onAutoForward": "openPreview"
}
},

"forwardPorts": [3000],

"postCreateCommand": "npm install",

"waitFor": "postCreateCommand",

"postAttachCommand": {
"Server": "npm start --host"
},

"customizations": {
"codespaces": {
"openFiles": ["src/index.js"]
},
"vscode": {
"extensions": [
"esbenp.prettier-vscode",
"humao.rest-client",
"qwtel.sqlite-viewer"
]
}
}
}
Loading

0 comments on commit 8805b4e

Please sign in to comment.