Skip to content

Commit a5a7d24

Browse files
committed
add wp 5.7 compatibility
1 parent cba648d commit a5a7d24

File tree

4 files changed

+47
-0
lines changed

4 files changed

+47
-0
lines changed

docker-compose.yml

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,29 @@
11
version: "3"
22
services:
3+
wordpress5-7:
4+
build:
5+
context: .
6+
dockerfile: ./docker/wp5.7/php-${CS_WORDPRESS_BOUNCER_PHP_VERSION}.Dockerfile
7+
networks:
8+
- wordpress_bouncer_network_ipv4
9+
- wordpress_bouncer_network_ipv6
10+
depends_on:
11+
- crowdsec
12+
- mysql
13+
- redis
14+
- memcached
15+
environment:
16+
WORDPRESS_DB_USER: root
17+
WORDPRESS_DB_PASSWORD: super_secret_password
18+
WORDPRESS_DEBUG: 1 # Comment this line the simulate the production mode
19+
WORDPRESS_CONFIG_EXTRA: |
20+
define('WP_CRON_LOCK_TIMEOUT', 1);
21+
# more here https://hub.docker.com/_/wordpress
22+
ports:
23+
- "80:80"
24+
volumes:
25+
- .:/var/www/html/wp-content/plugins/cs-wordpress-bouncer:rw
26+
- ./docker/tests.htaccess:/var/www/html/.htaccess:rw
327
wordpress5-6:
428
build:
529
context: .

docker/wp5.7/php-7.3.Dockerfile

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
FROM wordpress:5.7-php7.3
2+
3+
RUN usermod -u 1000 www-data
4+
5+
RUN a2disconf remoteip && a2dismod remoteip && service apache2 restart
6+
7+
RUN apt-get update && apt-get install -y git libmemcached-dev zlib1g-dev \
8+
&& pecl install -o -f redis memcached \
9+
&& rm -rf /tmp/pear \
10+
&& docker-php-ext-enable redis memcached \
11+
&& curl -sS https://getcomposer.org/installer | php -- --install-dir=/usr/local/bin --filename=composer

docker/wp5.7/php-7.4.Dockerfile

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
FROM wordpress:5.7-php7.4
2+
3+
RUN usermod -u 1000 www-data
4+
5+
RUN a2disconf remoteip && a2dismod remoteip && service apache2 restart
6+
7+
RUN apt-get update && apt-get install -y git libmemcached-dev zlib1g-dev \
8+
&& pecl install -o -f redis memcached \
9+
&& rm -rf /tmp/pear \
10+
&& docker-php-ext-enable redis memcached \
11+
&& curl -sS https://getcomposer.org/installer | php -- --install-dir=/usr/local/bin --filename=composer

run-tests-with-all-wp-versions.sh

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
#!/bin/bash
22

3+
WORDPRESS_VERSION=5.7 ./run-tests.sh
34
WORDPRESS_VERSION=5.6 ./run-tests.sh
45
WORDPRESS_VERSION=5.5 ./run-tests.sh
56
WORDPRESS_VERSION=5.4 ./run-tests.sh

0 commit comments

Comments
 (0)