/wp-nginx-unit-docker-file

Basic WordPress docker file with nginx-unit

Primary LanguagePHP

Creating Wordpress Image

!!! Ignore below. Will update as necessary. This is to build a docker image using nginx unit for wordpress and push to a docker registry.

Development Setup

  1. Make a new developer folder mkdir wp-dev.
  2. Change into folder cd wp-dev
  3. Checkout this repo into the folder with the .devcontainer as the name.
  • git clone git@github.com:johanmartindev/wp-devcontainer.git .devcontainer
  1. Check the Wordpress repo into this folder.
  • git@github.com:johanmartindev/wp-nginx-unit-docker-file.git wordpress
  1. Open vscode. code . or via menu in vs code.
  2. Start vscode devcontainer
  3. Setup WordPress site
composer update # update local packages
composer install # install composer config

wp db reset --yes # Clear the database

wp core install --url=${DOMAIN_CURRENT_SITE} --title="${SITE_TITLE}" --admin_user=admin --admin_password=randomtest --admin_email=info@johanmartin.dev --debug

wp core multisite-install --url=${DOMAIN_CURRENT_SITE}  --title="${SITE_TITLE}" --admin_user=admin --admin_password=randomtest --admin_email=info@johanmartin.dev

wp plugin activate woocommerce --network

wp core update-db --network
wp server --port=8000 --debug --color --host=127.0.0.1

Build docker image

  • cp example.env .env
  • docker-compose up -d

Nginx Unit

PHP Composer File

WordPress Config

Setup Errors