Skip to content

Commit 20412e8

Browse files
committed
add support for wp 4.9 to 5.6
1 parent bb9ac9a commit 20412e8

22 files changed

+373
-7
lines changed

crowdsec.php

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,8 @@
1010
Github: https://github.com/crowdsecurity/cs-wordpress-blocker
1111
License: MIT
1212
Requires PHP: 7.2
13+
Requires at least: 4.9
14+
Tested up to: 5.6
1315
Stable tag: 0.3.0
1416
Text Domain: crowdsec-wp
1517
*/

docker-compose.yml

Lines changed: 134 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
version: "3"
22
services:
3-
web:
3+
wordpress:
44
build:
55
context: .
66
dockerfile: ./docker/php-${CS_WORDPRESS_BOUNCER_PHP_VERSION}.Dockerfile
@@ -9,7 +9,25 @@ services:
99
- mysql
1010
- redis
1111
- memcached
12+
environment:
13+
- WORDPRESS_DB_PASSWORD=super_secret_password
14+
- WORDPRESS_DEBUG=1
15+
#- WORDPRESS_CONFIG_EXTRA=define('DISABLE_WP_CRON', true);
16+
# more here https://hub.docker.com/_/wordpress
17+
ports:
18+
- "80:80"
19+
volumes:
20+
- .:/var/www/html/wp-content/plugins/cs-wordpress-bouncer
1221

22+
wordpress5.5:
23+
build:
24+
context: .
25+
dockerfile: ./docker/wp5.5/php-${CS_WORDPRESS_BOUNCER_PHP_VERSION}.Dockerfile
26+
links:
27+
- crowdsec
28+
- mysql
29+
- redis
30+
- memcached
1331
environment:
1432
- WORDPRESS_DB_PASSWORD=super_secret_password
1533
- WORDPRESS_DEBUG=1
@@ -19,6 +37,121 @@ services:
1937
- "80:80"
2038
volumes:
2139
- .:/var/www/html/wp-content/plugins/cs-wordpress-bouncer
40+
41+
wordpress5.4:
42+
build:
43+
context: .
44+
dockerfile: ./docker/wp5.4/php-${CS_WORDPRESS_BOUNCER_PHP_VERSION}.Dockerfile
45+
links:
46+
- crowdsec
47+
- mysql
48+
- redis
49+
- memcached
50+
environment:
51+
- WORDPRESS_DB_PASSWORD=super_secret_password
52+
- WORDPRESS_DEBUG=1
53+
#- WORDPRESS_CONFIG_EXTRA=define('DISABLE_WP_CRON', true);
54+
# more here https://hub.docker.com/_/wordpress
55+
ports:
56+
- "80:80"
57+
volumes:
58+
- .:/var/www/html/wp-content/plugins/cs-wordpress-bouncer
59+
60+
wordpress5.3:
61+
build:
62+
context: .
63+
dockerfile: ./docker/wp5.3/php-${CS_WORDPRESS_BOUNCER_PHP_VERSION}.Dockerfile
64+
links:
65+
- crowdsec
66+
- mysql
67+
- redis
68+
- memcached
69+
environment:
70+
- WORDPRESS_DB_PASSWORD=super_secret_password
71+
- WORDPRESS_DEBUG=1
72+
#- WORDPRESS_CONFIG_EXTRA=define('DISABLE_WP_CRON', true);
73+
# more here https://hub.docker.com/_/wordpress
74+
ports:
75+
- "80:80"
76+
volumes:
77+
- .:/var/www/html/wp-content/plugins/cs-wordpress-bouncer
78+
79+
wordpress5.2:
80+
build:
81+
context: .
82+
dockerfile: ./docker/wp5.2/php-${CS_WORDPRESS_BOUNCER_PHP_VERSION}.Dockerfile
83+
links:
84+
- crowdsec
85+
- mysql
86+
- redis
87+
- memcached
88+
environment:
89+
- WORDPRESS_DB_PASSWORD=super_secret_password
90+
- WORDPRESS_DEBUG=1
91+
#- WORDPRESS_CONFIG_EXTRA=define('DISABLE_WP_CRON', true);
92+
# more here https://hub.docker.com/_/wordpress
93+
ports:
94+
- "80:80"
95+
volumes:
96+
- .:/var/www/html/wp-content/plugins/cs-wordpress-bouncer
97+
98+
wordpress5.1:
99+
build:
100+
context: .
101+
dockerfile: ./docker/wp5.1/php-${CS_WORDPRESS_BOUNCER_PHP_VERSION}.Dockerfile
102+
links:
103+
- crowdsec
104+
- mysql
105+
- redis
106+
- memcached
107+
environment:
108+
- WORDPRESS_DB_PASSWORD=super_secret_password
109+
- WORDPRESS_DEBUG=1
110+
#- WORDPRESS_CONFIG_EXTRA=define('DISABLE_WP_CRON', true);
111+
# more here https://hub.docker.com/_/wordpress
112+
ports:
113+
- "80:80"
114+
volumes:
115+
- .:/var/www/html/wp-content/plugins/cs-wordpress-bouncer
116+
117+
wordpress5.0:
118+
build:
119+
context: .
120+
dockerfile: ./docker/wp5.0/php-${CS_WORDPRESS_BOUNCER_PHP_VERSION}.Dockerfile
121+
links:
122+
- crowdsec
123+
- mysql
124+
- redis
125+
- memcached
126+
environment:
127+
- WORDPRESS_DB_PASSWORD=super_secret_password
128+
- WORDPRESS_DEBUG=1
129+
#- WORDPRESS_CONFIG_EXTRA=define('DISABLE_WP_CRON', true);
130+
# more here https://hub.docker.com/_/wordpress
131+
ports:
132+
- "80:80"
133+
volumes:
134+
- .:/var/www/html/wp-content/plugins/cs-wordpress-bouncer
135+
136+
wordpress4.9:
137+
build:
138+
context: .
139+
dockerfile: ./docker/wp4.9/php-${CS_WORDPRESS_BOUNCER_PHP_VERSION}.Dockerfile
140+
links:
141+
- crowdsec
142+
- mysql
143+
- redis
144+
- memcached
145+
environment:
146+
- WORDPRESS_DB_PASSWORD=super_secret_password
147+
- WORDPRESS_DEBUG=1
148+
#- WORDPRESS_CONFIG_EXTRA=define('DISABLE_WP_CRON', true);
149+
# more here https://hub.docker.com/_/wordpress
150+
ports:
151+
- "80:80"
152+
volumes:
153+
- .:/var/www/html/wp-content/plugins/cs-wordpress-bouncer
154+
22155
crowdsec:
23156
image: crowdsecurity/crowdsec:latest
24157
environment:

docker/wp4.9/php-7.2.Dockerfile

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
FROM wordpress:4.9-php7.2
2+
3+
RUN apt-get update && apt-get install -y git libmemcached-dev zlib1g-dev \
4+
&& pecl install -o -f redis memcached \
5+
&& rm -rf /tmp/pear \
6+
&& docker-php-ext-enable redis memcached \
7+
&& curl -sS https://getcomposer.org/installer | php -- --install-dir=/usr/local/bin --filename=composer
8+
9+
RUN apt-get install -y \
10+
libfreetype6-dev \
11+
libmcrypt-dev \
12+
libjpeg-dev \
13+
libpng-dev \
14+
&& docker-php-ext-configure gd \
15+
--with-freetype-dir=/usr/include/freetype2 \
16+
--with-png-dir=/usr/include \
17+
--with-jpeg-dir=/usr/include \
18+
&& docker-php-ext-install gd
19+
20+

docker/wp5.0/php-7.2.Dockerfile

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
FROM wordpress:5.0-php7.2
2+
3+
RUN apt-get update && apt-get install -y git libmemcached-dev zlib1g-dev \
4+
&& pecl install -o -f redis memcached \
5+
&& rm -rf /tmp/pear \
6+
&& docker-php-ext-enable redis memcached \
7+
&& curl -sS https://getcomposer.org/installer | php -- --install-dir=/usr/local/bin --filename=composer
8+
9+
RUN apt-get install -y \
10+
libfreetype6-dev \
11+
libmcrypt-dev \
12+
libjpeg-dev \
13+
libpng-dev \
14+
&& docker-php-ext-configure gd \
15+
--with-freetype-dir=/usr/include/freetype2 \
16+
--with-png-dir=/usr/include \
17+
--with-jpeg-dir=/usr/include \
18+
&& docker-php-ext-install gd
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
FROM wordpress:5.6-php8.0
1+
FROM wordpress:5.0-php7.3
22

33
RUN apt-get update && apt-get install -y git libmemcached-dev zlib1g-dev \
44
&& pecl install -o -f redis memcached \

docker/wp5.0/php-7.4.Dockerfile

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
FROM wordpress:5.0-php7.4
2+
3+
RUN apt-get update && apt-get install -y git libmemcached-dev zlib1g-dev \
4+
&& pecl install -o -f redis memcached \
5+
&& rm -rf /tmp/pear \
6+
&& docker-php-ext-enable redis memcached \
7+
&& curl -sS https://getcomposer.org/installer | php -- --install-dir=/usr/local/bin --filename=composer

docker/wp5.1/php-7.2.Dockerfile

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
FROM wordpress:5.1-php7.2
2+
3+
RUN apt-get update && apt-get install -y git libmemcached-dev zlib1g-dev \
4+
&& pecl install -o -f redis memcached \
5+
&& rm -rf /tmp/pear \
6+
&& docker-php-ext-enable redis memcached \
7+
&& curl -sS https://getcomposer.org/installer | php -- --install-dir=/usr/local/bin --filename=composer
8+
9+
RUN apt-get install -y \
10+
libfreetype6-dev \
11+
libmcrypt-dev \
12+
libjpeg-dev \
13+
libpng-dev \
14+
&& docker-php-ext-configure gd \
15+
--with-freetype-dir=/usr/include/freetype2 \
16+
--with-png-dir=/usr/include \
17+
--with-jpeg-dir=/usr/include \
18+
&& docker-php-ext-install gd

docker/wp5.1/php-7.3.Dockerfile

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

docker/wp5.1/php-7.4.Dockerfile

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

docker/wp5.2/php-7.2.Dockerfile

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
FROM wordpress:5.2-php7.2
2+
3+
RUN apt-get update && apt-get install -y git libmemcached-dev zlib1g-dev \
4+
&& pecl install -o -f redis memcached \
5+
&& rm -rf /tmp/pear \
6+
&& docker-php-ext-enable redis memcached \
7+
&& curl -sS https://getcomposer.org/installer | php -- --install-dir=/usr/local/bin --filename=composer
8+
9+
RUN apt-get install -y \
10+
libfreetype6-dev \
11+
libmcrypt-dev \
12+
libjpeg-dev \
13+
libpng-dev \
14+
&& docker-php-ext-configure gd \
15+
--with-freetype-dir=/usr/include/freetype2 \
16+
--with-png-dir=/usr/include \
17+
--with-jpeg-dir=/usr/include \
18+
&& docker-php-ext-install gd

0 commit comments

Comments
 (0)