Anyone use wordprsss docker?

[ad_1]

the compose file is as so

version: ‘3.1’

services:

wordpress:
image: wordpress
restart: always
ports:
– 8080:80
environment:
WORDPRESS_DB_HOST: db
WORDPRESS_DB_USER: exampleuser
WORDPRESS_DB_PASSWORD: examplepass
WORDPRESS_DB_NAME: exampledb
volumes:
– wordpress:/var/www/html

db:
image: mysql:5.7
restart: always
environment:
MYSQL_DATABASE: exampledb
MYSQL_USER: exampleuser
MYSQL_PASSWORD: examplepass
MYSQL_RANDOM_ROOT_PASSWORD: ‘1’
volumes:
– db:/var/lib/mysql

volumes:
wordpress:
db:

IM trying to put mutiple instances in 1 compose file but i dont understand what i put in the bottom section which is

volumes:
wordpress:
db:

When i remove that section it doesnt install the DB but when i have it under multiple instances it complains. Any help is appreciated.

[ad_2]

 

This site will teach you how to build a WordPress website for beginners. We will cover everything from installing WordPress to adding pages, posts, and images to your site. You will learn how to customize your site with themes and plugins, as well as how to market your site online.

Buy WordPress Transfer