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 10, 2024
1 parent 0bfe328 commit c8f8a96
Show file tree
Hide file tree
Showing 4 changed files with 55 additions and 1 deletion.
3 changes: 3 additions & 0 deletions .devconteiner/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
FROM mcr.microsoft.com/devcontainers/javascript-node:1-18

RUN npm install -g pnpm
16 changes: 16 additions & 0 deletions .devconteiner/devcontainer.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
{
"name": "Astro",
"build": {
"dockerfile": "Dockerfile"
},

"postCreateCommand": "pnpm install && pnpm run build",

"waitFor": "postCreateCommand",

"customizations": {
"vscode": {
"extensions": ["astro-build.astro-vscode", "esbenp.prettier-vscode"]
}
}
}
34 changes: 34 additions & 0 deletions .devconteiner/invest-app-auth/devcontainer.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
{
"name": "Invest App Auth",
"build": {
"dockerfile": "../Dockerfile"
},

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

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

"forwardPorts": [4321],

"postCreateCommand": "pnpm install && cd /workspaces/lp2 && pnpm run build",

"waitFor": "postCreateCommand",

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

"customizations": {
"codespaces": {
"openFiles": ["src/pages/index.astro"]
},
"vscode": {
"extensions": ["astro-build.astro-vscode", "esbenp.prettier-vscode"]
}
}
}
3 changes: 2 additions & 1 deletion src/content/classnotes/expressjs/auth/index.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,8 @@ import CodeTree from '../../../../components/CodeTree.astro';

# {frontmatter.title}

[Código Fonte](https://github.com/ifpb/lp2/tree/main/public/codes/expressjs/invest-app-auth)
{/* [Código Fonte](https://github.com/ifpb/lp2/tree/main/public/codes/expressjs/invest-app-auth) */}
[![Open in GitHub Codespaces](https://github.com/codespaces/badge.svg)](https://codespaces.new/ifpb/lp2?devcontainer_path=.devcontainer/invest-app-auth/devcontainer.json)

<CodeTree src="/codes/expressjs/invest-app-auth" githubUrl={true} />

Expand Down

0 comments on commit c8f8a96

Please sign in to comment.