Compare commits

...

6 Commits

Author SHA1 Message Date
Jean-Christophe Vanhalle
8997df6327 adds wppb-cli 2024-11-02 13:51:10 +01:00
Jean-Christophe Vanhalle
fbcba7cde4 removes shell parameters since it's handled in /etc/bash.bashrc 2024-10-23 09:47:12 +02:00
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
4 changed files with 52 additions and 2 deletions

View File

@@ -3,3 +3,11 @@
- [ ] ajouter un moyen d'accéder à la db via un port - [ ] ajouter un moyen d'accéder à la db via un port
- [ ] ajouter une option pour créer sans traefik et sans adminer (via override compose) - [ ] ajouter une option pour créer sans traefik et sans adminer (via override compose)
- [ ] remplacer -a par --recursive,etc pour éviter qu'rsync n'affiche un transfert si atime, ctime, mtime a changé pour un fichier - [ ] remplacer -a par --recursive,etc pour éviter qu'rsync n'affiche un transfert si atime, ctime, mtime a changé pour un fichier
# wintercms
- [ ] configurer l'écran de login du back-end en HTTPS
# wordpress
- [ ] documenter wppb-cli

View File

@@ -137,7 +137,48 @@ if [ "${PROJECT_TYPE}" = "wintercms" ]; then
docker exec --user www-data --workdir "/var/www/html" -it "${PREFIX}-app" /bin/sh -c "php artisan winter:install" docker exec --user www-data --workdir "/var/www/html" -it "${PREFIX}-app" /bin/sh -c "php artisan winter:install"
fi 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 if [ "${PROJECT_TYPE}" = "wordpress" ]; then
echo "Installing wppb-cli"
composer global require tmeister/wppb-cli
echo "Downloading WordPress core" echo "Downloading WordPress core"
docker exec --user www-data "${PREFIX}-app" /bin/sh -c " docker exec --user www-data "${PREFIX}-app" /bin/sh -c "
wp core download \ wp core download \

View File

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

View File

@@ -6,8 +6,8 @@ set -a
set +a set +a
docker exec \ docker exec \
-e SHELLOPTS=vi \
-e HISTFILE=/var/www/html/.bash_history \ -e HISTFILE=/var/www/html/.bash_history \
-e SHELLOPTS=vi \
-it --user www-data \ -it --user www-data \
"${PREFIX}-app" \ "${PREFIX}-app" \
/bin/bash /bin/bash