Instala también el plugin de Soinumapa
config | ||
wordpress/plugins | ||
.gitmodules | ||
docker-compose.yml | ||
Dockerfile | ||
entrypoint.sh | ||
env.sample | ||
README.md | ||
start.sh |
Simple custom template for a clean Wordpress installation.
Pre
$ mkdir data db $ cp env.sample .env $ vim .env
Customize parameters
Build
$ docker-compose build
Run
$ docker-compose up -d
Access:
$ w3m http://localhost:<nginx_port>
Config
Database credentials may edit on .env file.
Auto update Wordpress
User crontab on your hoster server.
Use this script as template:
#!/bin/bash
echo "Update Wordrpress"
docker-compose exec wordpress wp theme update --all --path="/app/wordpress/"
docker-compose exec wordpress wp plugin update --all --path="/app/wordpress/"
docker-compose exec wordpress wp core update --path="/app/wordpress/"
Backups
docker-compose exec db mysqldump --database <MYSQL_DATABASE> > <custom_path>/.sql
Restore
Database restore, like this examples:
$ cat .sql | docker-compose exec db mysql -u <db_user> -p<db_pass>
Data restore, bulk to volume directory, like:
$ rsync -avz <backup_wordpress_dir> /var/lib/docker/volumes/<docker_wordpress_volume>/_data/wordpress/