diff --git a/.devcontainer/devcontainer.json b/.devcontainer/devcontainer.json index 00b0199..f3007a7 100644 --- a/.devcontainer/devcontainer.json +++ b/.devcontainer/devcontainer.json @@ -1,9 +1,6 @@ { + "init": true, "name": "justindfuller", - "forwardPorts": [9000], - "containerEnv": { - "PORT": "9000" - }, "features": { "ghcr.io/devcontainers/features/go:1": { "version": "1.21.1", @@ -13,5 +10,34 @@ "hostRequirements": { "cpus": 1 }, - "postCreateCommand": "make server-watch" + "image": "mcr.microsoft.com/devcontainers/universal:2", + "waitFor": "onCreateCommand", + "updateContentCommand": "go mod download", + "postCreateCommand": "go install github.com/cespare/reflex@latest", + "postAttachCommand": { + "server": "make server-watch" + }, + "customizations": { + "codespaces": { + "openFiles": [ + "README" + ] + }, + "vscode": { + "settings": {}, + "extensions": [ + "golang.go", + "dbaeumer.vscode-eslint", + "ms-vscode.makefile-tools", + "DavidAnson.vscode-markdownlint", + "eamodio.gitlens" + ] + } + }, + "portsAttributes": { + "9000": { + "label": "Application", + "onAutoForward": "openBrowserOnce" + } + } } \ No newline at end of file