Parcourir la source

adds default launch.json for laravel, livewire and php project

master
Jean-Christophe Vanhalle il y a 1 an
Parent
révision
07368aff02
1 fichiers modifiés avec 39 ajouts et 0 suppressions
  1. 39
    0
      create.sh

+ 39
- 0
create.sh Voir le fichier

@@ -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 "

Chargement…
Annuler
Enregistrer