This Docker Compose file is for the Udemy Course on Software Containerization with Docker
version: "3.1"
services:
wordpress:
image: wordpress
restart: always
ports:
- 8081:80
environment:
WORDPRESS_DB_HOST: db
WORDPRESS_DB_USER: francis ### YOU MUST CHANGE THIS before use
WORDPRESS_DB_PASSWORD: XXXXXXXXXX ### YOU MUST CHANGE THIS before use
WORDPRESS_DB_NAME: francisdb ### YOU MUST CHANGE THIS before use
networks:
nginxproxymanager_customnetwork:
ipv4_address: 172.20.0.9
volumes:
- wordpress:/var/www/html
db:
image: mysql:5.7
restart: always
environment:
MYSQL_DATABASE: francisdb ### YOU MUST CHANGE THIS before use
MYSQL_USER: francis ### YOU MUST CHANGE THIS before use
MYSQL_PASSWORD: XXXXXXXX ### YOU MUST CHANGE THIS before use
MYSQL_RANDOM_ROOT_PASSWORD: "1"
networks:
nginxproxymanager_customnetwork:
ipv4_address: 172.20.0.8
volumes:
- db:/var/lib/mysql
volumes:
wordpress:
db:
networks:
nginxproxymanager_customnetwork:
external: true