devcontainer.json 2.8 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788
  1. {
  2. "name": "Watch Finished Turbo Development",
  3. "dockerFile": "Dockerfile",
  4. "context": "..",
  5. // Configure tool-specific properties.
  6. "customizations": {
  7. // Configure properties specific to VS Code.
  8. "vscode": {
  9. "extensions": [
  10. "ms-vscode.vscode-typescript-next",
  11. "bradlc.vscode-tailwindcss",
  12. "esbenp.prettier-vscode",
  13. "ms-vscode.vscode-eslint",
  14. "ms-vscode.vscode-json",
  15. "ms-playwright.playwright",
  16. "ms-vscode.test-adapter-converter",
  17. "hbenl.vscode-test-explorer",
  18. "ms-vscode.vscode-jest",
  19. "ms-vscode-remote.remote-containers",
  20. "GitHub.copilot",
  21. "GitHub.copilot-chat"
  22. ],
  23. "settings": {
  24. "typescript.preferences.preferTypeOnlyAutoImports": true,
  25. "typescript.suggest.autoImports": true,
  26. "editor.formatOnSave": true,
  27. "editor.defaultFormatter": "esbenp.prettier-vscode",
  28. "editor.codeActionsOnSave": {
  29. "source.fixAll.eslint": "explicit"
  30. },
  31. "tailwindCSS.experimental.classRegex": [
  32. ["cva\\(([^)]*)\\)", "[\"'`]([^\"'`]*).*?[\"'`]"],
  33. ["cx\\(([^)]*)\\)", "(?:'|\"|`)([^']*)(?:'|\"|`)"]
  34. ],
  35. "jest.autoRun": "off",
  36. "playwright.reuseBrowser": true
  37. }
  38. }
  39. },
  40. // Features to add to the dev container. More info: https://containers.dev/features.
  41. "features": {
  42. "ghcr.io/devcontainers/features/github-cli:1": {},
  43. "ghcr.io/devcontainers/features/docker-in-docker:2": {},
  44. "ghcr.io/devcontainers/features/node:1": {
  45. "version": "20",
  46. "pnpmVersion": "latest"
  47. },
  48. "ghcr.io/devcontainers/features/git:1": {
  49. "version": "latest",
  50. "ppa": false
  51. }
  52. },
  53. // Use 'forwardPorts' to make a list of ports inside the container available locally.
  54. "forwardPorts": [
  55. 3000, // Next.js web app
  56. 3001, // NestJS API service
  57. 9229 // Node.js debugger
  58. ],
  59. // Use 'postCreateCommand' to run commands after the container is created.
  60. "postCreateCommand": "pnpm install",
  61. // Configure tool-specific properties.
  62. "remoteUser": "node",
  63. // Mount the workspace
  64. "workspaceMount": "source=${localWorkspaceFolder},target=/workspaces/watch-finished-turbo,type=bind,consistency=cached",
  65. "workspaceFolder": "/workspaces/watch-finished-turbo",
  66. // Environment variables
  67. "containerEnv": {
  68. "NODE_ENV": "development",
  69. "PNPM_HOME": "/home/node/.local/share/pnpm",
  70. "PATH": "/home/node/.local/share/pnpm:/home/node/.local/share/pnpm/global/5/node_modules/.bin:${PATH}"
  71. },
  72. // Security options
  73. "securityOpt": ["label:disable"],
  74. // Mounts for persistent data
  75. "mounts": [
  76. "source=${localWorkspaceFolder}/.devcontainer/.pnpm-store,target=/home/node/.local/share/pnpm,type=volume",
  77. "source=${localWorkspaceFolder}/data,target=/workspaces/watch-finished-turbo/data,type=bind"
  78. ]
  79. }