Skip to content

Commit 7e3ade9

Browse files
authored
Update README.md
1 parent d60b6bf commit 7e3ade9

File tree

1 file changed

+3
-106
lines changed

1 file changed

+3
-106
lines changed

README.md

+3-106
Original file line numberDiff line numberDiff line change
@@ -1,108 +1,5 @@
1-
# DEVELOPMENT WordPress environment with Docker
1+
### This docker compose is designed to have a modern development and production environment, easy to set up
22

3-
#### This docker compose was made to have a modern WP dev environment which can be portable, easy to set up and focused on the use of `wp`.
3+
![wordpress_docker - peque](https://user-images.githubusercontent.com/7026066/37237721-7a6f12e8-23e5-11e8-87d1-0b1386a693ae.png)
44

5-
## Start everything
6-
7-
You need to pass several arguments such as:
8-
- **DB_PASS** When the DB is raised this will be its root password
9-
10-
`export DB_PASS=YOUR_SUPER_SECURE_PASSWORD && export UID && docker-compose up`
11-
12-
> With `docker-compose up` it will run a phpmyadmin service, this is created with goal of facilitate the management of the DataBase (not all of us are command ninja). You can stop it when you are not using it with `docker-compose stop phpmyadmin`
13-
14-
## Configuring Wordmove
15-
16-
Your `Movefile` must be inside `configs/wordmove/`.
17-
18-
## Deploying your database
19-
20-
We recommend to have a repo for your WordPress site, so the themes and plugins should be deployed by a `git pull` command.
21-
22-
> By the moment we don't expose the wordmove entrypoint in the container so you need to login to container and execute the following commands
23-
24-
25-
### Login in to the container
26-
27-
`docker-compose run --rm wordmove /bin/bash`
28-
29-
### Creating Movefile
30-
31-
`wordmove init`
32-
33-
### Deploying `uploads` folder
34-
35-
`wordmove push --uploads`
36-
37-
### Deploying your database
38-
39-
`wordmove push --db`
40-
41-
> #### The database deploy will overwritte the database on the production site, each comment, post, subscriber that is not in your local database will be lost
42-
43-
----------------------------------
44-
45-
# PRODUCTION WordPress environment with Docker
46-
47-
#### This docker compose was made to have a modern WP dev environment which can be portable, easy to set up and with HTTPS with letsencrypt.
48-
49-
## Start everything
50-
51-
You need to pass several arguments such as:
52-
- **DB_PASS** When the DB is raised this will be its root password
53-
- **DOMAIN** Put your domain _your-domain.com_. This is needed to the https set up.
54-
- **EMAIL** Put your email domain _email@your-domain.com_. This is needed to the https set up.
55-
56-
`export DB_PASS=YOUR_SUPER_SECURE_PASSWORD && export DOMAIN=your-domain.com && export EMAIL=email@your-domain.com && docker-compose --file docker-compose-production.yml up -d && docker-compose --file docker-compose-production.yml stop phpmyadmin`
57-
58-
> This will stop the phpmyadmin service for security reasons, if you want to run it just
59-
> `docker-compose --file docker-compose-production.yml start phpmyadmin`
60-
61-
--------------------------
62-
63-
# Common features
64-
65-
In this section you will find development and production common features.
66-
67-
## Steps to begin with a new WP project
68-
69-
1. Create the user using phpmyadmin
70-
- allow connection from any host
71-
- create a database with the same name with all privileges
72-
2. Download the WordPress core using
73-
- `docker-compose run --rm --user=82 wp_server wp core download`
74-
3. Create your `wp-config` file
75-
- `docker-compose run --rm --user=82 wp_server wp core config --prompt`
76-
- 1/12 --dbname=<**dbname**>: `YOUR_DB_NAME`
77-
- 2/12 --dbuser=<**dbuser**>: `USER_CREATED_AT_1`
78-
- 3/12 [--dbpass=<**dbpass**>]: `PASS_CREATED_AT_1`
79-
- 4/12 [--dbhost=<**dbhost**>]: `mariadb`
80-
- 5...12 - Default values set by enter
81-
4. Install WordPress site
82-
- `docker-compose run --rm --user=82 wp_server wp core install --prompt`
83-
- 1/6 --url=<**url**>: `localhost`
84-
- 2...6 - Your personal configuration
85-
86-
## Changing the PHP version
87-
88-
> Remember that if you are on production you must specify docker compose file using `--file docker-compose-production.yml`
89-
90-
1. stop everything with
91-
- `docker-compose stop`
92-
93-
2. On the `docker-compose.yml` file, on service `wp_server` on the section `args` leave uncommented the php version that you want
94-
```yml
95-
args:
96-
PHP_VERSION: 7.1
97-
# PHP_VERSION: 7.0
98-
# PHP_VERSION: 5.6
99-
```
100-
3. Then build the new image with:
101-
- `docker-compose build`
102-
4. Run everything again:
103-
- `export DB_PASS=YOUR_SUPER_SECURE_PASSWORD export DOMAIN=your-domain.com && export EMAIL=email@your-domain.com && docker-compose up`
104-
105-
5. To verify the version run
106-
- `docker-compose run --rm wp_server php --version`
107-
108-
> Written with [StackEdit](https://stackedit.io/).
5+
# The documentation is on the [WIKI 📚](https://github.com/bikecoders/docker-compose_wordpress/wiki)

0 commit comments

Comments
 (0)