/Docker-WordPress

Docker for WordPress Themes and Plugins Development.

Primary LanguageMakefile


Docker WordPress

Description

WordPress Themes and Plugins Development using Docker.

Install Prerequisites

All requisites should be available for your distribution. The most important are:

  1. Git
  2. Docker
  3. Docker Compose

Overview

All images are used:

Name Tag
WordPress php7.4-fpm
Nginx 1.25.2
MariaDB 10.11.5

Project Tree

.
├── Makefile
├── README.md
├── data
├── docker-compose.yml
├── logs
│   └── nginx
├── nginx
│   └── sites
│       └── default.conf
├── php-fpm
│   └── php.ini
└── src
    ├── plugins
    │   └── index.php
    ├── themes
    │   └── index.php
    └── uploads

Environment

To run this project you need to add following environment variables to your .env file.

# Application
APP_NAME=myapp

# WordPress
WORDPRESS_DB_NAME=db_wordpress
WORDPRESS_TABLE_PREFIX=wp_

# MariaDB
MARIADB_USER=default
MARIADB_PASSWORD=secret
MARIADB_ROOT_PASSWORD=root

Run

  1. Copy and modify the .env file.

    cp .env.example .env

    Modify the .env file with the following Environment above.

  2. Start services.

    docker-compose up -d
  3. Stop and clear services.

    docker-compose down -v

Or, you can use a Makefile to run the service.

make help

Tech Stack

  • Git
  • Docker
  • Docker Compose
  • Visual Studio Code
  • DBeaver