I have MULTISITE: 'true' defined in my docker-compose.yml. On the first start, multisite is enabled correctly. On subsequent starts I get a "The network already exists" message in the output, but wp-config.php is generated without the multisite constants, so WordPress admin tells me multisite support is not enabled.
Windows 10 20H2 (OS Build 19042.867)
Docker version 20.10.5
Workaround: run docker-compose down -v and start with a blank database every time (not ideal).
docker-compose.yml
version: '3'
services:
wordpress:
cap_add:
- SYS_ADMIN
devices:
- /dev/fuse
image: visiblevc/wordpress:latest
ports:
- 9000:80
- 44300:443
volumes:
- ./plugins:/app/wp-content/plugins
- ./install-dev-plugins:/docker-entrypoint-initwp.d/install-dev-plugins
- ./custom-block-types:/app/wp-content/plugins/custom-block-types
environment:
DB_HOST: db # must match db service name below
DB_NAME: wordpress
DB_PASS: root # must match below
URL_REPLACE: localhost:9000
WP_DEBUG: 'true'
MULTISITE: 'true'
extends:
service: localConfig
file: docker-compose.local.yml
db:
image: mysql:5.7 # or mariadb:10
volumes:
- data:/var/lib/mysql
environment:
MYSQL_ROOT_PASSWORD: root
volumes:
data: {}
Overview
docker-compose down -v
and start with a blank database every time (not ideal).docker-compose.yml
docker-compose.local.yml
docker-compose up
output