WordPress Themes and Plugins Development using Docker.
All requisites should be available for your distribution. The most important are:
All images are used:
Name | Tag |
---|---|
WordPress | php7.4-fpm |
Nginx | 1.25.2 |
MariaDB | 10.11.5 |
.
├── 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
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
-
Copy and modify the
.env
file.cp .env.example .env
Modify the
.env
file with the following Environment above. -
Start services.
docker-compose up -d
-
Stop and clear services.
docker-compose down -v
Or, you can use a Makefile to run the service.
make help
- Git
- Docker
- Docker Compose
- Visual Studio Code
- DBeaver