HHVM runs Wordpress behind Nginx/BoringSSL. Comes with plugin for/from Mailgun.org, and CDN Linker, which caches to Redis if you enable that.
Starting the container triggers database(s) restore from backups (if available and need be), and creates daily backups to another volume (listed below). Cron daemon is fcron.
Wordpress takes its data needed to connect to MariaDB/MySQL through environment variables, as provided by Docker image MariaDB.
Start with:
/bin/docker run --rm --name my_mariadb \
-e MYSQL_ROOT_PASSWORD=YYYYYYYYYYY \
-e MYSQL_USER=myuser -e MYSQL_PASSWORD=mypasswd \
-e MYSQL_DATABASE=my_wp \
-v /var/customer/me/mysql:/var/lib/mysql \
"mariadb:10.1"
And finally (all volumes are optional):
/bin/docker run --rm --name my_web \
--link "my_mariadb:MYSQL" \
-p 80:80 -p 443:443 \
-v /var/customer/me/backup:/var/www/backup \
-v /var/customer/me/log:/var/log \
-v /var/customer/me/hhvm-cache:/var/cache/hhvm \
wmark/wordpress-hhvm
Notable volumes:
/etc/ssl
— for your own SSL certificates (web.key is the private key, web.crt your certificate followed by your issuer's)/etc/nginx/vhosts.d
— customize Nginx' settings, add your own domain name/var/www/html
— this directory gets served by Nginx/HHVM/PHP/var/cache/hhvm
— HHVM stores its compiled-PHP–files here/var/www/backup
— daily backups of the MySQL or MariaDB database(s) go here, the latest is symlinked aslatest
/var/log
— logfiles/etc/fcrontab
— not really a directory, but in case you want other cronjobs: inject that file