dt-docker
Tools
Open Source
PHP
WordPress
Disciple.Tools Docker Setup
Docker is a container system that can be used to set up all of the infrastructure needed to run a web site. The below will setup containers locally to run:
- MySQL 5.7 database
- Apache + PHP 7.2 web server
All of this will be running on a Linux virtual machine in order to duplicate as close as possible the production hosting environment.
Setup Instructions
- Install Docker on your machine:
-
To set up a self-signed SSL certificate, follow the instructions here
- Site will be available on https://local.disciple.tools (if you add the needed hosts file mapping) or https://localhost:44300
-
Run
docker-compose up -d
from the project root directory (ornpm run docker-start
).
The first time this is run, it will need to download all of the machine images, so it may take a little while.
You should be able to access the site via https://local.disciple.tools (if you add the needed hosts file mapping) or https://localhost:44300 - Step through WordPress installation process
-
Install Theme: https://github.com/DiscipleTools/disciple-tools-theme
- Download latest release: https://github.com/DiscipleTools/disciple-tools-theme/releases/latest/download/disciple-tools-theme.zip
-
Install plugins
- https://github.com/DiscipleTools/disciple-tools-demo-content
- https://github.com/WP-API/Basic-Auth
-
https://wordpress.org/plugins/jwt-authentication-for-wp-rest-api/
- Follow directions on plugin page to add auth header config to .htaccess
- Follow directions on plugin page to add 2 values to wp-config.php
-
Enable debugging
-
Edit wp-config.php to add the following values:
define( 'WP_DEBUG', true ); // Enable WP_DEBUG mode define( 'WP_DEBUG_LOG', true ); // Enable Debug logging to the /wp-content/debug.log file
-
Edit wp-config.php to add the following values:
Multi-site Setup
See https://www.wpbeginner.com/glossary/multisite/
-
Add the following to
wp-config.php
/* Multisite */ define('WP_ALLOW_MULTISITE', true);
-
Go to
Tools -> Network Setup
and follow on-screen directions, adding the necessary code to.htaccess
andwp-config.php
- After changes, login again and return to wp-admin.
-
A new My Sites item appears in the top menu. Go to
My Sites -> Network Admin -> Dashboard
// 1. Copydisciple-tools-multisite.php
intowp-content/plugins/disciple-tools-multisite
-
Add all of the sites as you desire.
-
For each site you add, add the needed entry to your local hosts file (e.g.
127.0.0.1 site1.local.disciple.tools
)
-
For each site you add, add the needed entry to your local hosts file (e.g.