Skip to content

Commit 7f3c6a3

Browse files
authored
feat:Added files for devcontainer support (#243)
1 parent 2f24aae commit 7f3c6a3

2 files changed

Lines changed: 37 additions & 0 deletions

File tree

.devcontainer/Dockerfile

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
FROM mcr.microsoft.com/devcontainers/javascript-node:20
2+
3+
# Install mkcert and NSS (for browser trust)
4+
RUN apt-get update && apt-get install -y libnss3-tools \
5+
&& curl -JLO "https://dl.filippo.io/mkcert/latest?for=linux/amd64" \
6+
&& chmod +x mkcert-v*-linux-amd64 \
7+
&& mv mkcert-v*-linux-amd64 /usr/local/bin/mkcert
8+
9+
# Pre-install npm dependencies (optional but speeds up CDE startup)
10+
COPY package*.json ./
11+
RUN npm install
12+

.devcontainer/devcontainer.json

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
{
2+
"name": "Club Website Workspace",
3+
"build": {
4+
"dockerfile": "Dockerfile",
5+
"context": ".."
6+
},
7+
"customizations": {
8+
"vscode": {
9+
"extensions": ["dbaeumer.vscode-eslint", "esbenp.prettier-vscode"]
10+
}
11+
},
12+
"forwardPorts": [3000],
13+
"portsAttributes": {
14+
"3000": {
15+
"label": "npm dev server",
16+
"onAutoForward": "notify",
17+
"protocol": "http"
18+
}
19+
},
20+
"postCreateCommand": "mkcert localhost 127.0.0.1"
21+
"remoteEnv": {
22+
"SSL_CRT_FILE": "${containerWorkspaceFolder}/dev-cert.pem",
23+
"SSL_KEY_FILE": "${containerWorkspaceFolder}/dev-key.pem"
24+
}
25+
}

0 commit comments

Comments
 (0)