You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Aug 27, 2020. It is now read-only.
With this command you can still connect to all stacks if you have consistent naming, just change `$NAME`
3
+
````bash
4
+
NAME=wpdev && docker run --rm -it \
5
+
--volumes-from="${NAME}_wordpress_1" \
6
+
--network="${NAME}_default" \
7
+
-e WORDPRESS_HOST=wordpress:9000 \
8
+
-u 33 \
9
+
test \
10
+
\
11
+
/bin/bash
12
+
Success: WordPress is up to date.
13
+
````
14
+
15
+
Or if you have non-consistent naming place `.env` file in your `docker-compose.yaml` folder, `docker-compose` will read it automatically:
16
+
````bash
17
+
---------- 420 buk 345233 236 Jan 26 14:06 .env
18
+
---------- 420 buk 345233 124 Jan 26 14:06 docker-compose.yaml
19
+
````
20
+
````env
21
+
# .env
22
+
NETWORK_NAME=mynetwork
23
+
WORDPRESS_CONTAINER=mycontainer
24
+
````
25
+
````yaml
26
+
# docker-compose.yaml
27
+
networks:
28
+
test:
29
+
name: $NETWORK_NAME
30
+
31
+
services:
32
+
33
+
wordpress:
34
+
container_name: $WORDPRESS_CONTAINER
35
+
networks:
36
+
- test
37
+
38
+
mysql:
39
+
networks:
40
+
- test
41
+
````
42
+
And then run:
43
+
```bash
44
+
source .env && \
45
+
docker run -it \
46
+
--volumes-from="${WORDPRESS_CONTAINER}" \
47
+
--network="${NETWORK_NAME}" \
48
+
wordpress:cli-php7.4 \
49
+
\
50
+
/bin/bash -c "wp core update"
51
+
```
52
+
53
+
To use `name` in `networks` you have to use `docker-compose >= 3.4`
54
+
Also, keep in mind:
55
+
56
+
> Values in the shell take precedence over those specified in the .env file. If you set TAG to a different value in your shell, the substitution in image uses that instead
57
+
58
+
59
+
* See https://docs.docker.com/v17.12/compose/environment-variables/#set-environment-variables-with-docker-compose-run
2. If you want to use your extensions in chrome, you have to use [chrome extension](https://chrome.google.com/webstore/detail/jetbrains-ide-support/hmhgeddbohgjknpmjagkdomcpobmllji?hl=en) (see picture 1 "User JetBrains IDE Support")
Copy file name to clipboardexpand all lines: README.md
+58-38
Original file line number
Diff line number
Diff line change
@@ -3,51 +3,74 @@
3
3
4
4
Local stack for developing [`wordpress`](https://wordpress.org/)
5
5
6
-
Future goal of this project is to bring painless developing experience alongside production ready containers ready to be deploy to plain `docker` or `kubernetes` via `CI/CD` pipelines.
7
-
```bash
8
-
CONTAINER ID NAME CPU % MEM USAGE / LIMIT MEM % NET I/O BLOCK I/O PIDS
* You can add plugins and themes that you want to be installed automatically in [wpdev.yaml](./var/config/wpdev.yaml) (for now only official plugins and themes can be installed this way using slug)
10
+
* Edit [.env](./.env) file to your needs (you may want to change ports if you are working on few project at a time )
11
+
* Default themes and plugins that are bundled with wordpress are deleted.
*theres `run_tests.sh` or `.gitlab-ci.yml` that can be used to run your tests
20
66
* tests are parsing your site and checking if everything responds with status code `200`, to change that behaviour see [this file](./tests/python/crawl.py)
21
67
* static files are handled by `nginx`
22
68
* wp-cli will handle changing `SITE_URL` based on your `.env` settings
23
-
* this stack can be easy deployed live using `make deploy`
* to backup your database into `./var/backups` run:
52
75
```bash
53
76
make db-export
@@ -57,11 +80,11 @@ make db-export
57
80
make copy-db
58
81
```
59
82
## Tests
60
-
* while running `make tests` or directly calling `run_tests.sh` live deployment will be tested too, it means that your host should resolve `$DOMAIN_NAME` from `.env` file
61
83
* to run a simle crawling test checking for status code 200 on your local development run
62
84
```bash
63
85
make crawl-local
64
86
```
87
+
65
88
```bash
66
89
PARSED
67
90
{
@@ -142,11 +165,8 @@ make copy-db
142
165
# todo & needs fixing
143
166
* design db migration schemas and production database separation
144
167
* make http benchmarking
145
-
* lower mysql ram usage (currently 80MiB)
146
-
* urls like `localhost:9333/asdASDa/435/345/345/345` redirect to `homepage` why?
147
-
* modify `wp-cli` to allow custom setup (activating plugins etc.)
168
+
* lower mysql and wordpress ram usage (currently 20MiB and 80MiB but after installing theme up to 300MiB and 400MiB?????)
148
169
* allow `crawl.py` allowed rules to be specified in a file
149
170
* create solid `nginx` configuration
150
171
*test file permissions and sensitive files
151
172
* mysql 8.0.18 gives `mbind: Operation not permitted`
0 commit comments