From 31a143133b121fd41ea0b41aaa9c19e122fc2be0 Mon Sep 17 00:00:00 2001 From: Alicia Sykes Date: Sun, 26 Apr 2026 14:22:43 +0100 Subject: [PATCH] =?UTF-8?q?=F0=9F=94=A7=20Updates=20dev=20container=20vers?= =?UTF-8?q?ions=20and=20config?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .devcontainer/devcontainer.json | 36 ++++++++++++++++++++++++++------- 1 file changed, 29 insertions(+), 7 deletions(-) diff --git a/.devcontainer/devcontainer.json b/.devcontainer/devcontainer.json index 96b1e1bc..a6e0d46a 100644 --- a/.devcontainer/devcontainer.json +++ b/.devcontainer/devcontainer.json @@ -4,17 +4,25 @@ "name": "Dashy", // Or use a Dockerfile or Docker Compose file. More info: https://containers.dev/guide/dockerfile "image": "mcr.microsoft.com/devcontainers/javascript-node:1-24-bookworm", + "customizations": { "vscode": { "extensions": [ "Vue.volar", "dbaeumer.vscode-eslint", - "ms-azuretools.vscode-docker", + "ms-azuretools.vscode-containers", "EditorConfig.EditorConfig", - "esbenp.prettier-vscode", "vitest.explorer", "redhat.vscode-yaml" - ] + ], + "settings": { + "editor.formatOnSave": false, + "editor.codeActionsOnSave": { + "source.fixAll.eslint": "explicit" + }, + "eslint.validate": ["javascript", "vue"], + "files.eol": "\n" + } } }, @@ -23,11 +31,25 @@ "ghcr.io/devcontainers/features/github-cli:1": {} }, - // Make the dev server and production server ports available locally. - "forwardPorts": [8080, 4000], + // Ports to forward to the host (Codespaces / Dev Containers will surface these). + "forwardPorts": [8080, 4000, 4001], + "portsAttributes": { + "8080": { + "label": "Vite Dev Server", + "onAutoForward": "openPreview" + }, + "4000": { + "label": "Dashy (Production)", + "onAutoForward": "notify" + }, + "4001": { + "label": "Dashy (SSL)", + "onAutoForward": "silent" + } + }, - // Use 'postCreateCommand' to run commands after the container is created. - "postCreateCommand": "yarn install --ignore-engines --network-timeout 300000" + // Runs once after the container is created, then VS Code attaches. + "postCreateCommand": "yarn install --network-timeout 600000" // Uncomment to connect as root instead. More info: https://aka.ms/dev-containers-non-root. // "remoteUser": "root"