91 lines
2.3 KiB
Markdown
91 lines
2.3 KiB
Markdown
# description
|
|
|
|
- [Bedrock Wordpress](https://roots.io/bedrock/) (modern Wordpress workflow)
|
|
- webserver Caddy
|
|
- bdd Mariadb
|
|
- Redis object cache
|
|
- thème [Sage](https://roots.io/sage/) (Tailwind CSS et Laravel Blade).
|
|
|
|
# installation
|
|
|
|
0. docker et docker-compose installés sur le host
|
|
1. cloner la stack
|
|
- `git clone https://figureslibres.io/gogs/valentin_le_moign/docker_partition_jlg.git`
|
|
2. `cd docker_partition_jlg`
|
|
3. build la stack `make build_stack`
|
|
4. build bedrock `make build_bedrock`
|
|
5. installer la db
|
|
- `docker exec -it mariadb /bin/sh`
|
|
- `mysql -u root -p --force --one-database wordpress < /wordpress.sql`
|
|
- prompt password db `password`
|
|
- `exit`
|
|
6. cloner le thème
|
|
- `git submodule add -f https://figureslibres.io/gogs/valentin_le_moign/partition-jlg-theme.git ./src/bedrock/web/app/themes/partition-jlg-theme`
|
|
7. installer le thème `make install_theme`
|
|
8. ouvrir `https://localhost:80` (possible d'ignorer l'erreur https dans firefox)
|
|
9. activer redis dans l'admin wordpress
|
|
- `plugins -> installed plugins`
|
|
- `settings -> redis`
|
|
|
|
# dev
|
|
|
|
1. depuis la racine du stack `cd src/bedrock/web/app/themes/partition-jlg-theme`
|
|
2. `git pull`
|
|
3. bidouiller le thème
|
|
4. `git add .`
|
|
5. `git commit -m "message de commit"`
|
|
6. `git push origin master`
|
|
|
|
# tailwind
|
|
|
|
1. `docker exec -it -w /app/public/bedrock/web/app/themes/partition-jlg-theme php-fpm`
|
|
2. `yarn dev`
|
|
|
|
|
|
1. Ouvrir le dossier du thème avec VSCode
|
|
2. Installer extension VSCode *Tailwind CSS IntelliSense*
|
|
3. *Settings* `ctrl + ,` -> `Files:Association` -> *Item* `.php` *Value* `tailwindcss`
|
|
|
|
# xdebug
|
|
|
|
- Installer l'extension Codium / VSCode PHP Debug
|
|
- Mapping dans .vscode
|
|
- Installer l'extension de navigateur Xdebug
|
|
|
|
|
|
# phpmyadmin
|
|
|
|
Sur le port 8080
|
|
|
|
|
|
# todo stack
|
|
|
|
urgent
|
|
- workflow dev / collaboration
|
|
- variables d'environnement
|
|
|
|
debug
|
|
- pb https
|
|
- setup, test, documenter xdebug
|
|
|
|
plus tard
|
|
- passwords -> redis, mariadb, phpmyadmin
|
|
- redis as muplugin
|
|
- installer matomo
|
|
- composer install au lieu de bash script
|
|
- déploiement workflow
|
|
|
|
|
|
# ressources
|
|
|
|
- Sage
|
|
https://toby.ink/blog/2020/11/26/dummys-guide-to-roots-sage-theme-in-wordpress
|
|
|
|
|
|
# dump db
|
|
|
|
- `docker exec -it mariadb /bin/sh`
|
|
- `mysqldump -u root -p wordpress > /var/lib/mysql/wordpress.sql`
|
|
- `exit`
|
|
- `sudo mv data/wordpress.sql ./Docker/mariadb/wordpress.sql`
|