D.T on Docker Setup
Last updated
Was this helpful?
Last updated
Was this helpful?
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 needed to run a MySQL database and an Apache + PHP 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.
There are currently three sets of instructions for setting up a Disciple Tools server locally using Docker. Choose the one that suites your needs best.
Prepackaged Image
Video Walk-through
The videos do not follow these instructions exactly, but it is better to use them to help understand these instructions, instead of following them by themselves.
Example Template
For Windows:
When you start the Docker Desktop, if necessary it will provide you with additional instructions to update WSL 2 (Windows Subsystem for Linux)
If the user account you commonly use does not have admin privileges, you can add it to the docker-users group so you can run docker directly without requiring “runas” (similar to “sudo” in Linux/MacOS)
From the
Computer Management
app: open System Tools > Local Users and Groups > Groups, double click the "docker-users" group and from the "Add..." dialog add the desired user account.
For Windows:
The instructions above for MacOs work if you have OpenSSL installed
OpenSSL is available via
From command line in the project root directory (your copy of the Github repository) run:
Specify the Common Name as 'local.disciple.tools'. You may answer the other questions however you wish.
Create a .env
file and copy/paste the following, and then update the values:
(DOMAIN
value can be an IP address - e.g., 127.0.0.1
or 192.168.1.2
)
Download the files, or clone the repository from GitHub, to use as a template.
Warning: The configuration files were up to date the last time they were edited, but always make sure to double check what the most up to date versions of the software components are, or make certain to install mutually compatible versions.
For example, the dockerfile should have up to date version numbers for Wordpress and PHP.
The first line will look like:
FROM wordpress:5.4-php7.4-apache
Run docker-compose up -d
from the project root directory (or npm 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.
There will be some warning messages that can be ignored, unless Docker cannot bring the Wordpress and Mysql containers up.
For Windows: You will need to add a “security exception” in your browser from its warning dialog (depending on browser).
Step through the WordPress installation process.
Language:
Site Title:
Username:
Password:
Your Email:
Press “Install WordPress”
Some production plugins are available for installation from the Extensions tab. For developement, or unlisted plugins:
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
Edit wp-config.php to add the following values:
Add the following to wp-config.php
Go to Tools -> Network Setup and follow on-screen directions, adding the necessary code to .htaccess and wp-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
Copy disciple-tools-multisite.php
into wp-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. For example:
is the easiest of the three to install (similar effort to setting up a environment), but it is difficult to update preinstalled plugins.
This shows how to set up for D.T. Mobile App development on a local machine, which includes setting up the Docker server environment
which these instructions were originally based on, and provides a downloadable set configuration files, which can be updated.
Install the correct Docker download for your platform
Set up the self-signed SSL certificate. (The instructions are explained in detail)
Warning: If you will be working on the Mobile app code, it when connecting to a local server, so this step is not required.
,
,
,
or
Note: Already updated dev.conf and dockerfile configuration files are available from
Site will be available on (if you add the needed hosts file mapping) or
Configure Docker according to which one of the you choose:
Download the docker-compose.yml
file from into your working directory (or clone it from GitHub)
As mentioned , the works best to help understand these instructions, rather than following it alone.
These instructions were originally based on
Check for which version of Wordpress disciple-tools-theme has been tested with.>
You should be able to access the site via (if you add the needed hosts file mapping), or
Warning: When you configure WordPress from “” or “” you will have to continue to use that address or reconfigure it from the …/wp-admin/options-general.php settings page to switch.
Note: If you cannot access DT’s home page: or other pages try this:
Login to wp-admin and go to Settings > Permalinks. You don’t need to change anything, just click Save at the bottom.
(Source: section: )
NOTE: If you used the this has already been done for you. However, if you need to update the theme you must do it manually from within the container!
Go to
Download latest release:
Follow installation instructions:
NOTE: If you used the some plugins have already been installed for you. However, if you need to update a pre-installed plugin you must do it manually from within the container!
Download the latest plugin zip files from below, and install plugins using these instructions:
Download JWT Authentication for WP REST API from:
See