Skip to content

nginx, Redis, Wordpress, CDN Linker, fcron, automatic backups — for testing purposes

Notifications You must be signed in to change notification settings

g0ld3lux/docker-wordpress-hhvm

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

24 Commits
 
 
 
 
 
 
 
 

Repository files navigation

Nginx, Redis, Wordpress, HHVM

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.

Usage

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:

  1. /etc/ssl — for your own SSL certificates (web.key is the private key, web.crt your certificate followed by your issuer's)
  2. /etc/nginx/vhosts.d — customize Nginx' settings, add your own domain name
  3. /var/www/html — this directory gets served by Nginx/HHVM/PHP
  4. /var/cache/hhvm — HHVM stores its compiled-PHP–files here
  5. /var/www/backup — daily backups of the MySQL or MariaDB database(s) go here, the latest is symlinked as latest
  6. /var/log — logfiles
  7. /etc/fcrontab — not really a directory, but in case you want other cronjobs: inject that file

About

nginx, Redis, Wordpress, CDN Linker, fcron, automatic backups — for testing purposes

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Shell 84.6%
  • Nginx 15.4%