@@ -24,6 +24,38 @@ Use WordPress locally with Docker using [Docker compose](https://docs.docker.com
2424+ [ Docker] ( https://www.docker.com/get-started )
2525+ Openssl for creatng the SSL cert. Install using Homebrew ` brew install openssl `
2626
27+ ### Setup environment variables
28+
29+ #### For Docker
30+
31+ Copy ` .env-example ` in the project root to ` .env ` and edit your preferences.
32+
33+ Example:
34+
35+ ``` yml
36+ IP=127.0.0.1
37+ APP_NAME=myapp
38+ DOMAIN="myapp.local"
39+ DB_HOST=mysql
40+ DB_NAME=myapp
41+ DB_ROOT_PASSWORD=password
42+ DB_TABLE_PREFIX=wp_
43+
44+ ```
45+
46+ #### For WordPress
47+
48+ Copy ` .env-example ` in the ` src ` folder to Copy ` .env ` and edit your preferences.
49+
50+ Use the following database settings:
51+
52+ ``` yml
53+ DB_HOST=mysql:3306
54+ DB_NAME=myapp
55+ DB_USER=root
56+ DB_PASSWORD=password
57+ ```
58+
2759### Create SSL cert
2860
2961``` shell
@@ -46,32 +78,12 @@ cd cli
4678./trust-cert.sh
4779```
4880
49- > Edit the script to your your custom domain, this example uses myapp.local
50-
5181### Setup vhost in /etc/hosts
5282
5383``` shell
5484cd cli
5585./setup-hosts-file.sh
5686```
57- > Follow the instructions. For example use ` myapp.local `
58-
59- ### Setup ENV
60-
61- ``` shell
62- cd src
63- cp .env.example .env
64- ```
65-
66- Use the following database settings:
67-
68- ``` yml
69- DB_HOST=mysql:3306
70- DB_NAME=myapp
71- DB_USER=root
72- DB_PASSWORD=password
73- ```
74-
7587## Install WordPress and Composer dependencies
7688
7789``` shell
@@ -89,6 +101,12 @@ docker-compose up -d
89101
90102🚀 Open up [ https://myapp.local ] ( https://myapp.local )
91103
104+ ## PhpMyAdmin
105+
106+ PhpMyAdmin comes installed as a service in docker-compose.
107+
108+
109+ Open [ http://127.0.0.1:8080/ ] ( http://127.0.0.1:8080/ )
92110
93111### Notes:
94112
@@ -111,6 +129,10 @@ wp search-replace https://olddomain.com https://newdomain.com --allow-root
111129
112130### Changelog
113131
132+ #### 2020-01-11
133+ - Added ` .env ` support for specifying your own app name, domain etc. Copy ` .env-example ` to ` .env ` and edit your preferences.
134+ - Added phpMyAdmin. Visit [ http://127.0.0.1:8080/ ] ( http://127.0.0.1:8080/ )
135+
114136#### 2019-08-02
115137- Added Linux support. Thanks to [ @faysal-ishtiaq ] ( https://github.com/faysal-ishtiaq ) .
116138
0 commit comments