Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

wp large support #5

Merged
merged 12 commits into from
Dec 24, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,10 @@ vendor/
.DS_Store

#Tools
node_modules/
.test-results*

# App
.bouncer-key
.cache/
*.log
*.log
14 changes: 13 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,4 +7,16 @@
- Go to 'Plugins' -> 'Add New' And click on "Upload Plugin" (at the top of the page)
- Choose your zipped plugins file and install it
- Now you can activate it and see a new menu named "CrowdSec"
```
```

## Demo guide

Follow the [Demo Guide](docs/full-guide.md) to discover the main features this plugin is capable of.

## How to contribute?

Look at the [Contributor guide](docs/contribute.md).

## FAQ

Look at the [FAQ of this plugin](docs/faq.md).
2 changes: 2 additions & 0 deletions crowdsec.php
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,8 @@
Github: https://github.com/crowdsecurity/cs-wordpress-blocker
License: MIT
Requires PHP: 7.2
Requires at least: 4.9
Tested up to: 5.6
Stable tag: 0.3.0
Text Domain: crowdsec-wp
*/
Expand Down
155 changes: 150 additions & 5 deletions docker-compose.yml
Original file line number Diff line number Diff line change
@@ -1,28 +1,171 @@
version: "3"
services:
web:
wordpress:
build:
context: .
dockerfile: ./docker/php-${CS_WORDPRESS_BOUNCER_PHP_VERSION}.Dockerfile
links:
depends_on:
- crowdsec
- mysql
- redis
- memcached
environment:
WORDPRESS_DB_PASSWORD: super_secret_password
WORDPRESS_DEBUG: 1
WORDPRESS_CONFIG_EXTRA: |
define('WP_CRON_LOCK_TIMEOUT', 1);
# more here https://hub.docker.com/_/wordpress
ports:
- "80:80"
volumes:
- .:/var/www/html/wp-content/plugins/cs-wordpress-bouncer

wordpress5.5:
build:
context: .
dockerfile: ./docker/wp5.5/php-${CS_WORDPRESS_BOUNCER_PHP_VERSION}.Dockerfile
depends_on:
- crowdsec
- mysql
- redis
- memcached
environment:
WORDPRESS_DB_PASSWORD: super_secret_password
WORDPRESS_DEBUG: 1
WORDPRESS_CONFIG_EXTRA: |
define('WP_CRON_LOCK_TIMEOUT', 1);
# more here https://hub.docker.com/_/wordpress
ports:
- "80:80"
volumes:
- .:/var/www/html/wp-content/plugins/cs-wordpress-bouncer

wordpress5.4:
build:
context: .
dockerfile: ./docker/wp5.4/php-${CS_WORDPRESS_BOUNCER_PHP_VERSION}.Dockerfile
depends_on:
- crowdsec
- mysql
- redis
- memcached
environment:
WORDPRESS_DB_PASSWORD: super_secret_password
WORDPRESS_DEBUG: 1
WORDPRESS_CONFIG_EXTRA: |
define('WP_CRON_LOCK_TIMEOUT', 1);
# more here https://hub.docker.com/_/wordpress
ports:
- "80:80"
volumes:
- .:/var/www/html/wp-content/plugins/cs-wordpress-bouncer

wordpress5.3:
build:
context: .
dockerfile: ./docker/wp5.3/php-${CS_WORDPRESS_BOUNCER_PHP_VERSION}.Dockerfile
depends_on:
- crowdsec
- mysql
- redis
- memcached
environment:
WORDPRESS_DB_PASSWORD: super_secret_password
WORDPRESS_DEBUG: 1
WORDPRESS_CONFIG_EXTRA: |
define('WP_CRON_LOCK_TIMEOUT', 1);
# more here https://hub.docker.com/_/wordpress
ports:
- "80:80"
volumes:
- .:/var/www/html/wp-content/plugins/cs-wordpress-bouncer

wordpress5.2:
build:
context: .
dockerfile: ./docker/wp5.2/php-${CS_WORDPRESS_BOUNCER_PHP_VERSION}.Dockerfile
depends_on:
- crowdsec
- mysql
- redis
- memcached
environment:
WORDPRESS_DB_PASSWORD: super_secret_password
WORDPRESS_DEBUG: 1
WORDPRESS_CONFIG_EXTRA: |
define('WP_CRON_LOCK_TIMEOUT', 1);
# more here https://hub.docker.com/_/wordpress
ports:
- "80:80"
volumes:
- .:/var/www/html/wp-content/plugins/cs-wordpress-bouncer

wordpress5.1:
build:
context: .
dockerfile: ./docker/wp5.1/php-${CS_WORDPRESS_BOUNCER_PHP_VERSION}.Dockerfile
depends_on:
- crowdsec
- mysql
- redis
- memcached
environment:
- WORDPRESS_DB_PASSWORD=super_secret_password
- WORDPRESS_DEBUG=1
#- WORDPRESS_CONFIG_EXTRA=define('DISABLE_WP_CRON', true);
WORDPRESS_DB_PASSWORD: super_secret_password
WORDPRESS_DEBUG: 1
WORDPRESS_CONFIG_EXTRA: |
define('WP_CRON_LOCK_TIMEOUT', 1);
# more here https://hub.docker.com/_/wordpress
ports:
- "80:80"
volumes:
- .:/var/www/html/wp-content/plugins/cs-wordpress-bouncer

wordpress5.0:
build:
context: .
dockerfile: ./docker/wp5.0/php-${CS_WORDPRESS_BOUNCER_PHP_VERSION}.Dockerfile
depends_on:
- crowdsec
- mysql
- redis
- memcached
environment:
WORDPRESS_DB_PASSWORD: super_secret_password
WORDPRESS_DEBUG: 1
WORDPRESS_CONFIG_EXTRA: |
define('WP_CRON_LOCK_TIMEOUT', 1);
# more here https://hub.docker.com/_/wordpress
ports:
- "80:80"
volumes:
- .:/var/www/html/wp-content/plugins/cs-wordpress-bouncer

wordpress4.9:
build:
context: .
dockerfile: ./docker/wp4.9/php-${CS_WORDPRESS_BOUNCER_PHP_VERSION}.Dockerfile
depends_on:
- crowdsec
- mysql
- redis
- memcached
environment:
WORDPRESS_DB_PASSWORD: super_secret_password
WORDPRESS_DEBUG: 1
WORDPRESS_CONFIG_EXTRA: |
define('WP_CRON_LOCK_TIMEOUT', 1);
# more here https://hub.docker.com/_/wordpress
ports:
- "80:80"
volumes:
- .:/var/www/html/wp-content/plugins/cs-wordpress-bouncer

crowdsec:
image: crowdsecurity/crowdsec:latest
environment:
- DISABLE_AGENT=true
ports:
- "8080:8080"
mysql:
image: mysql:5.7
environment:
Expand All @@ -34,3 +177,5 @@ services:
- "6379:6379"
memcached:
image: memcached:1-alpine
wpscan:
image: wpscanteam/wpscan
2 changes: 2 additions & 0 deletions docker/php-7.2.Dockerfile
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
FROM wordpress:5.6-php7.2

RUN a2disconf remoteip && a2dismod remoteip && service apache2 restart

RUN apt-get update && apt-get install -y git libmemcached-dev zlib1g-dev \
&& pecl install -o -f redis memcached \
&& rm -rf /tmp/pear \
Expand Down
2 changes: 2 additions & 0 deletions docker/php-7.3.Dockerfile
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
FROM wordpress:5.6-php7.3

RUN a2disconf remoteip && a2dismod remoteip && service apache2 restart

RUN apt-get update && apt-get install -y git libmemcached-dev zlib1g-dev \
&& pecl install -o -f redis memcached \
&& rm -rf /tmp/pear \
Expand Down
2 changes: 2 additions & 0 deletions docker/php-7.4.Dockerfile
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
FROM wordpress:5.6-php7.4

RUN a2disconf remoteip && a2dismod remoteip && service apache2 restart

RUN apt-get update && apt-get install -y git libmemcached-dev zlib1g-dev \
&& pecl install -o -f redis memcached \
&& rm -rf /tmp/pear \
Expand Down
20 changes: 20 additions & 0 deletions docker/wp4.9/php-7.2.Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
FROM wordpress:4.9-php7.2

RUN apt-get update && apt-get install -y git libmemcached-dev zlib1g-dev \
&& pecl install -o -f redis memcached \
&& rm -rf /tmp/pear \
&& docker-php-ext-enable redis memcached \
&& curl -sS https://getcomposer.org/installer | php -- --install-dir=/usr/local/bin --filename=composer

RUN apt-get install -y \
libfreetype6-dev \
libmcrypt-dev \
libjpeg-dev \
libpng-dev \
&& docker-php-ext-configure gd \
--with-freetype-dir=/usr/include/freetype2 \
--with-png-dir=/usr/include \
--with-jpeg-dir=/usr/include \
&& docker-php-ext-install gd


18 changes: 18 additions & 0 deletions docker/wp5.0/php-7.2.Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
FROM wordpress:5.0-php7.2

RUN apt-get update && apt-get install -y git libmemcached-dev zlib1g-dev \
&& pecl install -o -f redis memcached \
&& rm -rf /tmp/pear \
&& docker-php-ext-enable redis memcached \
&& curl -sS https://getcomposer.org/installer | php -- --install-dir=/usr/local/bin --filename=composer

RUN apt-get install -y \
libfreetype6-dev \
libmcrypt-dev \
libjpeg-dev \
libpng-dev \
&& docker-php-ext-configure gd \
--with-freetype-dir=/usr/include/freetype2 \
--with-png-dir=/usr/include \
--with-jpeg-dir=/usr/include \
&& docker-php-ext-install gd
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM wordpress:5.6-php8.0
FROM wordpress:5.0-php7.3

RUN apt-get update && apt-get install -y git libmemcached-dev zlib1g-dev \
&& pecl install -o -f redis memcached \
Expand Down
7 changes: 7 additions & 0 deletions docker/wp5.0/php-7.4.Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
FROM wordpress:5.0-php7.4

RUN apt-get update && apt-get install -y git libmemcached-dev zlib1g-dev \
&& pecl install -o -f redis memcached \
&& rm -rf /tmp/pear \
&& docker-php-ext-enable redis memcached \
&& curl -sS https://getcomposer.org/installer | php -- --install-dir=/usr/local/bin --filename=composer
18 changes: 18 additions & 0 deletions docker/wp5.1/php-7.2.Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
FROM wordpress:5.1-php7.2

RUN apt-get update && apt-get install -y git libmemcached-dev zlib1g-dev \
&& pecl install -o -f redis memcached \
&& rm -rf /tmp/pear \
&& docker-php-ext-enable redis memcached \
&& curl -sS https://getcomposer.org/installer | php -- --install-dir=/usr/local/bin --filename=composer

RUN apt-get install -y \
libfreetype6-dev \
libmcrypt-dev \
libjpeg-dev \
libpng-dev \
&& docker-php-ext-configure gd \
--with-freetype-dir=/usr/include/freetype2 \
--with-png-dir=/usr/include \
--with-jpeg-dir=/usr/include \
&& docker-php-ext-install gd
7 changes: 7 additions & 0 deletions docker/wp5.1/php-7.3.Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
FROM wordpress:5.1-php7.3

RUN apt-get update && apt-get install -y git libmemcached-dev zlib1g-dev \
&& pecl install -o -f redis memcached \
&& rm -rf /tmp/pear \
&& docker-php-ext-enable redis memcached \
&& curl -sS https://getcomposer.org/installer | php -- --install-dir=/usr/local/bin --filename=composer
7 changes: 7 additions & 0 deletions docker/wp5.1/php-7.4.Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
FROM wordpress:5.1-php7.4

RUN apt-get update && apt-get install -y git libmemcached-dev zlib1g-dev \
&& pecl install -o -f redis memcached \
&& rm -rf /tmp/pear \
&& docker-php-ext-enable redis memcached \
&& curl -sS https://getcomposer.org/installer | php -- --install-dir=/usr/local/bin --filename=composer
20 changes: 20 additions & 0 deletions docker/wp5.2/php-7.2.Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
FROM wordpress:5.2-php7.2

RUN a2disconf remoteip && a2dismod remoteip && service apache2 restart

RUN apt-get update && apt-get install -y git libmemcached-dev zlib1g-dev \
&& pecl install -o -f redis memcached \
&& rm -rf /tmp/pear \
&& docker-php-ext-enable redis memcached \
&& curl -sS https://getcomposer.org/installer | php -- --install-dir=/usr/local/bin --filename=composer

RUN apt-get install -y \
libfreetype6-dev \
libmcrypt-dev \
libjpeg-dev \
libpng-dev \
&& docker-php-ext-configure gd \
--with-freetype-dir=/usr/include/freetype2 \
--with-png-dir=/usr/include \
--with-jpeg-dir=/usr/include \
&& docker-php-ext-install gd
9 changes: 9 additions & 0 deletions docker/wp5.2/php-7.3.Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
FROM wordpress:5.2-php7.3

RUN a2disconf remoteip && a2dismod remoteip && service apache2 restart

RUN apt-get update && apt-get install -y git libmemcached-dev zlib1g-dev \
&& pecl install -o -f redis memcached \
&& rm -rf /tmp/pear \
&& docker-php-ext-enable redis memcached \
&& curl -sS https://getcomposer.org/installer | php -- --install-dir=/usr/local/bin --filename=composer
9 changes: 9 additions & 0 deletions docker/wp5.2/php-7.4.Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
FROM wordpress:5.2-php7.4

RUN a2disconf remoteip && a2dismod remoteip && service apache2 restart

RUN apt-get update && apt-get install -y git libmemcached-dev zlib1g-dev \
&& pecl install -o -f redis memcached \
&& rm -rf /tmp/pear \
&& docker-php-ext-enable redis memcached \
&& curl -sS https://getcomposer.org/installer | php -- --install-dir=/usr/local/bin --filename=composer
Loading