Simple implementation WordPress on docker container.
- Nginx proxy with FastCGI Cache
- PHP 7.3 with fpm
- Redis & memcaced optimized
- Customizeable php configuration
- WP CLI ready to use
- Optional install Yarn
VIRTUAL_HOST
(:wordpress.localhost) : name your nginx virtual host, support multiple host separated by spaceUSERNAME
(:wordpress) : linux username for running WordPress & SSH loginUSERGROUP
(:wordpress) : linux user group for running WordPress & SSH loginHTTPS
(:off) : tell php if WordPress inside https proxyHOME
(:/var/www) : user home, WordPress root will added here insidewordpress
directorySSH_PORT
(:2222) : SSH portSSH_PUBLIC_KEY
(:'') : Use public key authentication and disable password clear text loginSSH_PASSWORD
(:'') : SSH password optional if you prefered using SSH public keyTZ
(:Asia/Jakarta) : Your PHP TimezonePHP_MEMORY_LIMIT
(:128M) : PHP memory limitPHP_UPLOAD_MAX_SIZE
(:50M) : PHP maximum file size on uploadPHP_SESSION_SAVE_HANDLER
(:files) : Session handler, you can use redis or memcached herePHP_SESSION_SAVE_PATH
(:/var/lib/php/sessions) : Session save path location, for redis or memcaced use tcp or sock pathFPM_MAX_CHILDREN
(:5) : php-fpm pm.max_children per requestFPM_START_SERVER
(:2) : php-fpm initial child processFPM_MAX_SPARE_SERVERS
(:3) : php-fpm maximum spare server processFPM_ERROR_LOG
(:/dev/fd/2) : PHP error log, default output to docker loggerOPCACHE_ENABLE
(:1) : 1 or 0 to disable php opcache codeOPCACHE_ENABLE_CLI
(:0) : enable opcache on php cliOPCACHE_MEMORY
(:128) : number only, max opcache memory limitNGINX_ACCESS_LOG
(:/var/log/nginx/access.log main) :off
to disable nginx access logINSTALL_YARN
(:0) : Choose to install yarn package manager or not
If this WordPress need a clean install or mapped volume not configured to /var/www/wordpress
. You nedd to specify all WordPress installation information here. All Environment below is required for first run this container.
DB_HOST
: localhost or server IPDB_NAME
: database name, if not exists wp-cli will try to create thisDB_USER
: database user privilegesDB_PASSWORD
: databse user passwordSITE_URL
: WordPress site URLSITE_TITLE
: WordPress site nameADMIN_USERNAME
: WordPress administrator userADMIN_PASSWORD
: WordPress administrator passwordADMIN_EMAIL
: WordPress administrator email address