/dockerized-wordpress-nginx-php7-fpm-mysql

Dockerized Zero moment WordPress with nginx, php7, mysql with persistent mysql and wordpress data.

Primary LanguagePHPMIT LicenseMIT

WordPress with nginx, php7-fpm, MySQL and PhpMyAdmin

Built using Oficial images:

  • Nginx.
  • PHP altered to install docker-php-ext-install pdo pdo_mysql mysqli (check /php folder).
  • MySQL.
  • PHPMyAdmin.

Environment variables

  • Rename .env-demo to .env and set environment variables.
# APP Name
APP=appname

# Set persistent directories for 
# the database and WordPress.
PERSISTENT_APP=./wordpress
PERSISTENT_DB=./db/mysql

# mysql
MYSQL_HOST=mysql
MYSQL_ROOT_PASSWORD=pwd
MYSQL_DATABASE=db
MYSQL_USER=user
MYSQL_PASSWORD=secret

Get WordPress

Download WordPress into the main folder. Can change name and update PERSISTENT_APP value.

Run Docker

Once running

Requirements

Credit

Tried to deal with persistent as osteel's blog friends tells to test benefits (looking forward to hear any opinions related).