-
Notifications
You must be signed in to change notification settings - Fork 18
Expand file tree
/
Copy pathdocker-compose.yml
More file actions
35 lines (33 loc) · 1.05 KB
/
Copy pathdocker-compose.yml
File metadata and controls
35 lines (33 loc) · 1.05 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
# wp2shell lab — stock WordPress + MySQL, no plugins.
# WP_TAG selects the image: 6.9.4 = vulnerable (default), 7.0.2 = patched.
# WP_TAG=6.9.4 docker compose up -d # vulnerable
# WP_TAG=7.0.2 docker compose up -d # patched
#
# The DB user gets the mysql-image default (ALL ON wordpress.*), which excludes the global
# FILE privilege — this models a normal/managed host, where the chain is a read-only SQLi.
name: wp2shell-lab
services:
db:
image: mysql:8.0
environment:
MYSQL_DATABASE: wordpress
MYSQL_USER: wordpress
MYSQL_PASSWORD: wordpress
MYSQL_ROOT_PASSWORD: rootpw
healthcheck:
test: ["CMD", "mysqladmin", "ping", "-h", "localhost", "--silent"]
interval: 3s
timeout: 5s
retries: 40
wordpress:
image: wordpress:${WP_TAG:-6.9.4}
depends_on:
db:
condition: service_healthy
ports:
- "${WP_PORT:-8093}:80"
environment:
WORDPRESS_DB_HOST: db:3306
WORDPRESS_DB_USER: wordpress
WORDPRESS_DB_PASSWORD: wordpress
WORDPRESS_DB_NAME: wordpress