1
0

devcontainer.json 1.3 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546
  1. {
  2. "name": "PHP",
  3. "image": "mcr.microsoft.com/devcontainers/php",
  4. "customizations": {
  5. "vscode": {
  6. "extensions": [
  7. "github.codespaces",
  8. // PHP from https://github.com/devcontainers/templates/tree/main/src/php
  9. "xdebug.php-debug",
  10. "bmewburn.vscode-intelephense-client",
  11. "xdebug.php-pack",
  12. // PHP
  13. "DEVSENSE.phptools-vscode",
  14. "DEVSENSE.composer-php-vscode",
  15. // linting
  16. "EditorConfig.EditorConfig",
  17. "dbaeumer.vscode-eslint",
  18. "raymondcamden.CSSLint",
  19. // testing
  20. "maty.vscode-mocha-sidebar"
  21. ]
  22. },
  23. "codespaces": {
  24. "repositories": {
  25. "PrivateBin/*": {
  26. "permissions": {
  27. "pull_requests": "write"
  28. }
  29. }
  30. }
  31. }
  32. },
  33. "features": {
  34. "ghcr.io/devcontainers-contrib/features/mocha:2": {}
  35. },
  36. "forwardPorts": [
  37. 8080
  38. ],
  39. "postCreateCommand": [
  40. "composer install --no-dev --optimize-autoloader",
  41. "sudo chmod a+x \"$(pwd)\" && sudo rm -rf /var/www/html && sudo ln -s \"$(pwd)\" /var/www/html",
  42. "npm install --global nyc"
  43. ],
  44. // alternatiuve: apache2ctl start (but requires root)
  45. "postAttachCommand": "php -S 0.0.0.0:8080"
  46. }