adds default launch.json for laravel, livewire and php project
This commit is contained in:
39
create.sh
39
create.sh
@@ -137,6 +137,45 @@ if [ "${PROJECT_TYPE}" = "wintercms" ]; then
|
||||
docker exec --user www-data --workdir "/var/www/html" -it "${PREFIX}-app" /bin/sh -c "php artisan winter:install"
|
||||
fi
|
||||
|
||||
if [ "${PROJECT_TYPE}" = "laravel" ] || [ "${PROJECT_TYPE}" = "livewire" ] || [ "${PROJECT_TYPE}" = "php" ]; then
|
||||
echo "Generating vscode launch.json file"
|
||||
cat << EOF > /tmp/${PREFIX}/launch.json
|
||||
{
|
||||
"version": "0.2.0",
|
||||
"configurations": [
|
||||
{
|
||||
"hostname": "${TRAEFIK_LISTENING_IP}",
|
||||
"name": "Listen for Xdebug (${TRAEFIK_LISTENING_IP})",
|
||||
"pathMappings": {
|
||||
"/var/www/html/": "\${workspaceRoot}/",
|
||||
},
|
||||
"port": 9003,
|
||||
"request": "launch",
|
||||
"type": "php"
|
||||
}
|
||||
]
|
||||
}
|
||||
EOF
|
||||
docker run \
|
||||
--rm \
|
||||
--user www-data \
|
||||
--volume "${PREFIX}-app":/destination \
|
||||
ubuntu \
|
||||
mkdir --parents /destination/.vscode
|
||||
docker run \
|
||||
--rm \
|
||||
--user www-data \
|
||||
--volume "${PREFIX}-app":/destination \
|
||||
ubuntu \
|
||||
cp /source/launch.json /destination/.vscode
|
||||
docker run \
|
||||
--rm \
|
||||
--user root \
|
||||
--volume "${PREFIX}-app":/destination \
|
||||
ubuntu \
|
||||
chown www-data:www-data /destination/.vscode -r
|
||||
fi
|
||||
|
||||
if [ "${PROJECT_TYPE}" = "wordpress" ]; then
|
||||
echo "Downloading WordPress core"
|
||||
docker exec --user www-data "${PREFIX}-app" /bin/sh -c "
|
||||
|
||||
Reference in New Issue
Block a user