Reminder for quick Spip local dev environment setup with docker, spip-cli and php
Prerequisites :
- docker, composer, php (with update-alternatives if needed), spip-cli
Docs :
In one console :
docker run --name db -e MYSQL_ROOT_PASSWORD=1234 -p 33060:3306 -v $(pwd)/db-vol:/var/lib/mysql -d mysql:5.7 --character-set-server=utf8 --collation-server=utf8_unicode_ci
docker logs db -f
In another console :
docker run --name adminer --link db -p 8080:8080 -d adminer:latest
docker logs adminer -f
In a third console :
spip dl --branche spip-3.2.19
spip core:preparer
spip core:installer --db-server=mysql --db-login=thelogin --db-pass=1234 --db-host=the.docker.db.ip
mysql -u thelogin -P 3306 -h the.docker.db.ip -p spip < ~/way-to/dump.sql
spip config:ecrire -f tmp/adresse_site.json
spip plugins:lister -e
Install plugins from original plugins list (some plugins may not be available and will need a manual installation from spip admin)
spip plugins:activer --from-file=tmp/plugins.txt
or spip plugins:activer -e
spip cache:vider
php -S localhost:8000
or :
php -S localhost:8000 -d xdebug.mode=debug -d xdebug.client_host:localhost -d xdebug.client_port:9003 -d xdebug.discover_client_host
Go to http://localhost:8000
Sources :
- https://contrib.spip.net/SPIP-Cli
- https://hub.docker.com/r/ipeos/spip/#!
- https://www.spip.net/fr_rubrique91.html
- https://git.spip.net/spip-contrib-outils/spip-cli
Des sites sous SPIP :