chore: add devcontainer

This commit is contained in:
Supan Adit Pratama 2025-03-11 11:25:32 +07:00
parent 9a32ce701e
commit 1282ce00c8

View File

@ -0,0 +1,34 @@
// For format details, see https://aka.m s/devcontainer.json. For config options, see the
// README at: https://github.com/devcontainers/templates/tree/main/src/php
{
"name": "Todo App",
"image": "mcr.microsoft.com/devcontainers/php:1-7.4-bullseye",
// Or use a Dockerfile or Docker Compose file. More info: https://containers.dev/guide/dockerfile
"workspaceFolder": "/var/www/html",
// Features to add to the dev container. More info: https://containers.dev/features.
"features": {
"ghcr.io/devcontainers/features/git:1": {}
},
// Configure tool-specific properties.
"customizations": {
// Configure properties specific to VS Code.
"vscode": {
"settings": {},
"extensions": [
"GitHub.copilot"
]
}
},
// Use 'forwardPorts' to make a list of ports inside the container available locally.
"forwardPorts": [
8080
],
"postCreateCommand": "sudo chmod a+x \"$(pwd)\" && sudo rm -rf /var/www/html && sudo ln -s \"$(pwd)\" /var/www/html",
// Use 'portsAttributes' to set default properties for specific forwarded ports. More info: https://code.visualstudio.com/docs/remote/devcontainerjson-reference.
"portsAttributes": {
"8080": {
"label": "Apache Server",
"onAutoForward": "notify"
}
}
}