Skip to content

cairocoder01/dt-docker

Repository files navigation

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

  1. Install Docker on your machine:

  2. To set up a self-signed SSL certificate, follow the instructions here

    1. Site will be available on https://local.disciple.tools (if you add the needed hosts file mapping) or https://localhost:44300
  3. 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.

    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

  4. Step through Wordpress installation process

  5. Install Theme: https://github.com/DiscipleTools/disciple-tools-theme

    1. Download latest release: https://github.com/DiscipleTools/disciple-tools-theme/releases/latest/download/disciple-tools-theme.zip
  6. Install plugins

    1. https://github.com/DiscipleTools/disciple-tools-demo-content
    2. https://github.com/WP-API/Basic-Auth
    3. https://wordpress.org/plugins/jwt-authentication-for-wp-rest-api/
      1. Follow directions on plugin page to add auth header config to .htaccess
      2. Follow directions on plugin page to add 2 values to wp-config.php
  7. Enable debugging

    1. 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     

Multi-site Setup

See https://www.wpbeginner.com/glossary/multisite/

  1. Add the following to wp-config.php
    /* Multisite */
    define('WP_ALLOW_MULTISITE', true);
  2. Go to Tools -> Network Setup and follow on-screen directions, adding the necessary code to .htaccess and wp-config.php
  3. After changes, login again and return to wp-admin.
  4. A new My Sites item appears in the top menu. Go to My Sites -> Network Admin -> Dashboard // 1. Copy disciple-tools-multisite.php into wp-content/plugins/disciple-tools-multisite
  5. Add all of the sites as you desire.
    1. For each site you add, add the needed entry to your local hosts file (e.g. 127.0.0.1 site1.local.disciple.tools)

About

Docker image for disciple tools Wordpress theme

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages