Skip to content

Commit

Permalink
Setup Devcontainer config (#343)
Browse files Browse the repository at this point in the history
* Add devcontainer configuration and Dockerfile

* update
  • Loading branch information
Adammatthiesen authored Oct 6, 2024
1 parent 22037c7 commit 52fcafe
Show file tree
Hide file tree
Showing 3 changed files with 36 additions and 0 deletions.
7 changes: 7 additions & 0 deletions .devcontainer/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
FROM mcr.microsoft.com/devcontainers/javascript-node:0-20

# We uninstall pnpm here, since we enable the corepack version in the postCreateCommand
# This ensures we respect the "packageManager" version in package.json
RUN npm uninstall -g pnpm

COPY welcome-message.txt /usr/local/etc/vscode-dev-containers/first-run-notice.txt
26 changes: 26 additions & 0 deletions .devcontainer/devcontainer.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
{
"name": "StudioCMS Workspace",
"build": {
"dockerfile": "Dockerfile"
},

"postCreateCommand": "sudo corepack enable pnpm && pnpm config set store-dir /home/node/.pnpm-store && PUPPETEER_SKIP_CHROMIUM_DOWNLOAD=1 pnpm install",

"waitFor": "postCreateCommand",

"customizations": {
"codespaces": {
"openFiles": ["README.md"]
},
"vscode": {
"extensions": [
"astro-build.astro-vscode",
"astro-build.houston",
"biomejs.biome",
"eamodio.gitlens",
"redhat.vscode-yaml",
"ZainChen.json"
]
}
}
}
3 changes: 3 additions & 0 deletions .devcontainer/welcome-message.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
👋 Welcome to StudioCMS!

🛠️ Your environment is fully setup with all required software installed.

0 comments on commit 52fcafe

Please sign in to comment.