Skip to content

Commit 9c76718

Browse files
committed
update doc
1 parent a5155c4 commit 9c76718

File tree

2 files changed

+32
-35
lines changed

2 files changed

+32
-35
lines changed

README.md

Lines changed: 13 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,4 +7,16 @@
77
- Go to 'Plugins' -> 'Add New' And click on "Upload Plugin" (at the top of the page)
88
- Choose your zipped plugins file and install it
99
- Now you can activate it and see a new menu named "CrowdSec"
10-
```
10+
```
11+
12+
## Demo guide
13+
14+
Follow the [Demo Guide](docs/full-guide.md) to discover the main features this plugin is capable of.
15+
16+
## How to contribute?
17+
18+
Look at the [Contributor guide](docs/contribute.md).
19+
20+
## FAQ
21+
22+
Look at the [FAQ of this plugin](docs/faq.md).

docs/contribute.md

Lines changed: 19 additions & 34 deletions
Original file line numberDiff line numberDiff line change
@@ -1,37 +1,23 @@
11
# Contribute to this plugin
22

33
## Install the stack for development purpose
4-
## Select the PHP version you want to use (7.2, 7.3, 7.4, 8.0)
54

6-
```bash
7-
export CS_WORDPRESS_BOUNCER_PHP_VERSION=7.2
8-
```
9-
## Run tests
5+
Select the PHP version you want to use (7.2, 7.3, 7.4, 8.0) :
106

117
```bash
12-
./tests-local.sh # headless mode for speed up
13-
14-
DEBUG ./tests-local.sh
8+
export CS_WORDPRESS_BOUNCER_PHP_VERSION=7.2
159
```
1610

17-
> Note: you can add `await jestPlaywright.debug();` at the moment you want to pause the process.
18-
1911
Run containers:
2012

2113
```bash
2214
docker-compose up -d wordpress crowdsec mysql redis memcached
2315
```
2416

25-
Visit the wordpress instance here: http://localhost
26-
27-
Admin account: admin / ThisSecretIsKnown!
17+
Visit the wordpress instance here: http://localhost and install the wordpress instance.
2818

2919
# Init deps for dev environment
3020

31-
In `composer.json`, replace `"crowdsec/bouncer": "^..."` with `"crowdsec/bouncer": "dev-<a-dev-branch>"`.
32-
33-
> Important: Don't forget to replace this value by the new lib release tag when finishing the feature).
34-
3521
```bash
3622
docker-compose exec wordpress composer install --working-dir /var/www/html/wp-content/plugins/cs-wordpress-bouncer --prefer-source
3723
```
@@ -50,9 +36,7 @@ The LAPI URL is:
5036

5137
http://crowdsec:8080
5238

53-
docker-compose run crowdsec
54-
55-
# Play with crowdsec container
39+
# Play with crowdsec state
5640

5741
```bash
5842
# Get the Docker host IP from inside the crowdsec container
@@ -72,13 +56,23 @@ docker-compose exec crowdsec cscli decisions delete --all
7256
docker-compose logs crowdsec
7357
```
7458

59+
## Run functionnal tests
60+
61+
```bash
62+
./tests-local.sh # headless mode for speed up
63+
64+
DEBUG ./tests-local.sh
65+
```
66+
67+
> Note: you can add `await jestPlaywright.debug();` at the moment you want to pause the process.
68+
7569
# WP Scan pass
7670

7771
```bash
7872
docker-compose run --rm wpscan --url http://wordpress/
7973
```
8074

81-
### Docker-compose cheets sheet
75+
### Quick `docker-compose` cheet sheet
8276

8377
```bash
8478
docker-compose run wordpress sh # run sh on wordpress container
@@ -87,7 +81,7 @@ docker-compose stop # stop
8781
docker-compose rm # destroy
8882
```
8983

90-
### Use another PHP version
84+
### Try the plugin with another PHP version
9185

9286
```bash
9387
docker-compose down
@@ -100,16 +94,7 @@ CS_WORDPRESS_BOUNCER_PHP_VERSION=7.2 docker-compose up -d --build --force-recrea
10094

10195
In end 2020, [more than 90% of the wordpress websites](https://wordpress.org/about/stats/) was using Wordpress versions:
10296

103-
- 5.6
104-
- 5.5
105-
- 5.4
106-
- 5.3
107-
- 5.2
108-
- 5.1
109-
- 5.0
110-
- 4.9
111-
112-
The plugin is tested under each of these versions.
97+
The plugin is tested under each of these versions: `5.6`, `5.5`, `5.4`, `5.3`, `5.2`, `5.1`, `5.0`, `4.9`.
11398

11499
#### Add support for a new WordPress version
115100

@@ -139,7 +124,7 @@ docker-compose run wordpress<X.X> bash
139124
tail -f logs/*
140125
```
141126

142-
#### New feature
127+
#### New feature workflow
143128

144129
```bash
145130
git checkout -b <branch-name>
@@ -155,7 +140,7 @@ gh pr create --fill
155140

156141
> Note: after the merge, don't forget to delete to branch.
157142
158-
#### New release
143+
#### New release workflow
159144

160145
```bash
161146
git checkout main && git pull && git co -

0 commit comments

Comments
 (0)