Skip to content

Commit b3944bc

Browse files
doc: readme updated
1 parent 0e8b729 commit b3944bc

File tree

1 file changed

+56
-11
lines changed

1 file changed

+56
-11
lines changed

readme.md

Lines changed: 56 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,35 +1,80 @@
11
# Docker WordPress Environment
22

3-
This is a basic **Docker WordPress Environment** focused on the development of **plugins and themes**, supports [WP-CLI](https://wp-cli.org/) and [phpMyAdmin](https://www.phpmyadmin.net/).
3+
This is a basic **Docker WordPress Environment** focused on the development of **plugins and themes**, supports [WP-CLI](https://wp-cli.org/), [phpMyAdmin](https://www.phpmyadmin.net/) and [Xdebug](https://xdebug.org/).
4+
5+
## Table of Contents
6+
7+
- [Introduction](#docker-wordpress-environment)
8+
- [Services](#services)
9+
- [Requirements](#requirements)
10+
- [Usage](#usage)
11+
- [Variables](#variables)
12+
- [Contributing and Support](#contributing-and-support)
413

514
---
615

716
> **Disclaimer:** This project is meant to be used for development purposes only. It's **not** meant to be used in production.
817
9-
> It's work in progress. Feel free to contribute if you have anything useful to add.
10-
1118
---
1219

13-
## Usage
20+
### Services
1421

15-
Clone this repository, then cd the **docker folder** and run `docker-compose up -d` to start your project.
16-
17-
## Services
22+
Docker services used on [docker-compose. yml](https://github.com/sarahcssiqueira/docker-wordpress/blob/master/docker/docker-compose.yml):
1823

1924
- **db**
2025

21-
The MYSQL official image
26+
The MYSQL official image.
2227

2328
- **phpMyAdmin**
2429

25-
Intended to handle the administration of MySQL, in this case through [localhost:8080/](localhost:8080/).
30+
Intended to handle the administration of MySQL, in this case through port 80, on browser [localhost:8080/](localhost:8080/).
2631

2732
- **WordPress**
2833

29-
Uses the official WordPress docker image
34+
Uses the official WordPress latest docker image.
3035

3136
- **WP-CLI**
3237

33-
The **wpcli container** was added in order to only run one-off commands. Don’t need it to run as a service, only as a cli tool, for that run:
38+
The **wpcli container** was added to only run one-off commands. Don’t need it to run as a service, only as a cli tool, for that run:
3439

3540
`docker-compose run --rm wpcli command`
41+
42+
## Requirements
43+
44+
- [Docker](https://www.docker.com/) hub installed.
45+
46+
## Usage
47+
48+
Clone this repository `git clone https://github.com/sarahcssiqueira/docker-wordpress`
49+
then cd the **docker folder** `cd docker` and set up your chosen variables on the .env file.
50+
51+
### Variables
52+
53+
The variables used for WordPress installation are the following ones, you can use the same or change them, it's up to you.
54+
55+
```
56+
MYSQL_DATABASE_NAME=exampledatabase
57+
MYSQL_USER=exampleuser
58+
MYSQL_PASSWORD=examplepass
59+
WORDPRESS_PORT=8000
60+
```
61+
62+
---
63+
64+
> WARNING: DO NOT store your variables on a .env file if it's not a local development environment, for other cases, the appropriate method is to add the .env file to a .gitignore and store the variables as [encrypted secrets.](https://docs.github.com/en/actions/security-guides/encrypted-secrets)
65+
66+
---
67+
68+
After setting your variables, run `docker-compose up -d` to start the docker.
69+
70+
When docker finished their work (which can take a few minutes the first time, depending on your connection and machine) by opening your browser through http://localhost:8000, you should see the WordPress default installation screen.
71+
72+
Finish WordPress installation and in your terminal, cd the root project folder again type `cd ..` to start working on your plugins and/or themes.
73+
74+
For using wp-cli, use `docker-compose run --rm wpcli command` as it was added to only run one-off commands
75+
76+
The wp-core is synchronized too, just in case you need to check and/or debug something.
77+
78+
# Contributing and Support
79+
80+
It's **work in progress.** Feel free to contribute informing about [issues](https://github.com/sarahcssiqueira/docker-wordpress/issues) or even through [pull requests](https://github.com/sarahcssiqueira/docker-wordpress/pulls) for improvements.

0 commit comments

Comments
 (0)