devcontainer.json 1.4 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950
  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. "openFiles": [
  25. "README.md",
  26. "doc/README.md"
  27. ],
  28. "repositories": {
  29. "PrivateBin/*": {
  30. "permissions": {
  31. "pull_requests": "write"
  32. }
  33. }
  34. }
  35. }
  36. },
  37. "features": {
  38. "ghcr.io/devcontainers-contrib/features/mocha:2": {}
  39. },
  40. "forwardPorts": [
  41. 8080
  42. ],
  43. "postCreateCommand": [
  44. "composer install --no-dev --optimize-autoloader",
  45. "sudo chmod a+x \"$(pwd)\" && sudo rm -rf /var/www/html && sudo ln -s \"$(pwd)\" /var/www/html",
  46. "npm install --global nyc"
  47. ],
  48. // alternatiuve: apache2ctl start (but requires root)
  49. "postAttachCommand": "php -S 0.0.0.0:8080"
  50. }