Go to file
2022-12-09 03:40:02 +01:00
config Update: Simplify wordpress install 2022-12-09 03:40:02 +01:00
.gitignore Update: Simplify wordpress install 2022-12-09 03:40:02 +01:00
docker-compose.yml Update: Simplify wordpress install 2022-12-09 03:40:02 +01:00
Dockerfile Update: Simplify wordpress install 2022-12-09 03:40:02 +01:00
entrypoint.sh Update: Simplify wordpress install 2022-12-09 03:40:02 +01:00
env.sample Update: Simplify wordpress install 2022-12-09 03:40:02 +01:00
README.md Update: Simplify wordpress install 2022-12-09 03:40:02 +01:00

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/