version: '3.7'
services:
wordpress:
image: wordpress
networks:
- test1net
ports:
- "8001-8009:80"
links:
- "db:mysql"
depends_on:
- db
environment:
- WORDPRESS_DB_PASSWORD=test123
- WORDPRESS_DB_USER=root
- WORDPRESS_DB_NAME=testdb
volumes:
- ./www:/var/www/html
db:
image: mysql:5.7
networks:
- test1net
volumes:
- testvol3:/var/lib/mysql
environment:
- MYSQL_ROOT_PASSWORD=test123
- MYSQL_DATABASE=testdb
networks:
test1net:
external: true
volumes:
testvol3:
external: true