Compare commits

...

4 Commits

Author SHA1 Message Date
Jean-Christophe Vanhalle
07368aff02 adds default launch.json for laravel, livewire and php project 2024-10-22 20:07:47 +02:00
Jean-Christophe Vanhalle
e61b00b184 updates www user shell prompt with colours 2024-10-22 20:03:28 +02:00
Jean-Christophe Vanhalle
22a6286487 adds php project type 2024-10-18 12:48:17 +02:00
Jean-Christophe Vanhalle
a51f2ae8f3 renames wp.sh to www.sh 2024-10-15 16:32:10 +02:00
3 changed files with 43 additions and 3 deletions

View File

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

View File

@@ -1,4 +1,5 @@
PROJECT_TYPE=wordpress
PROJECT_TYPE=laravel
PROJECT_TYPE=livewire
PROJECT_TYPE=php
PROJECT_TYPE=wintercms
PROJECT_TYPE=wordpress

View File

@@ -6,8 +6,8 @@ set -a
set +a
docker exec \
-e SHELLOPTS=vi \
-e HISTFILE=/var/www/html/.bash_history \
-e SHELLOPTS=vi \
-it --user www-data \
"${PREFIX}-app" \
/bin/bash
/bin/bash -c '\nwww-data@${HOSTNAME} \[\033[01;35m\]\w\[\033[00m\]\n$ '