Skip to content

Local Docker environment for developing and testing the EPFL Library WordPress plugin and theme with automated setup and WP-CLI integration.

Notifications You must be signed in to change notification settings

epfllibrary/epfl-library-wp-devkit

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

WordPress local (WSL-friendly) --- plugin update rapide

Objectif : développer / mettre à jour le plugin wp-plugin-epfl-library en local, avec un feedback immédiat, puis ouvrir une Pull Request.


Prérequis

  • Docker Desktop + WSL2
  • docker compose disponible
  • git installé

⚠️ Sous WSL : garde ce projet dans le filesystem Linux (/home/<user>/...) plutôt que /mnt/c/... pour éviter de grosses lenteurs I/O.


Structure du projet

.
├─ docker-compose.yml
├─ Makefile
├─ .env                 # optionnel
├─ data/
│  ├─ wp/               # fichiers WordPress persistants
│  └─ db/               # données MariaDB persistantes
├─ plugins/
│  └─ wp-plugin-epfl-library/
└─ themes/
   └─ wp-theme-2018/

👉 Tout le persistant est sous ./data (optimisé WSL).
👉 Plugin + thème sont montés en bind mount :

➡️ modification locale = visible immédiatement dans WordPress.


Démarrage rapide

1️⃣ Config optionnelle

cp .env.example .env

2️⃣ Installation complète

make install

Cela va automatiquement :

  • créer les dossiers nécessaires
  • cloner plugin + thème si absents
  • démarrer MariaDB
  • installer WordPress via WP-CLI
  • activer thème + plugin
  • installer Polylang + langues FR/EN
  • démarrer Apache WordPress

Accès WordPress

<!-- -->
admin / admin

(modifiables via .env)


Développement du plugin

Le plugin est ici :

plugins/wp-plugin-epfl-library

👉 Tu modifies directement le code local :

  • pas besoin de rebuild Docker
  • reload navigateur suffit
  • parfait pour PR rapides

Commandes Makefile principales

Commande Description


make help Affiche l'aide make install Installation complète make up Démarre la DB make init Initialise WP via wpcli make down Stoppe les containers make restart Redémarre les containers make logs Logs Docker make reset Réinstallation propre make uninstall Supprime containers + data make clone Clone plugin + thème make fix-perms Fix permissions WSL


Reset complet

make reset

Cela :

  • supprime ./data/wp et ./data/db
  • réinitialise MariaDB
  • réinstalle WordPress automatiquement

Multilangue

Polylang est installé automatiquement avec :

  • français (fr_FR)
  • anglais (en_US)

Troubleshooting

WordPress réinstalle mal

make reset

MariaDB permission denied

make fix-perms

Author

Sylvain Vuilleumier
Documentary engineering specialist -- EPFL
sylvain.vuilleumier@epfl.ch


License

Apache License 2.0

About

Local Docker environment for developing and testing the EPFL Library WordPress plugin and theme with automated setup and WP-CLI integration.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published