Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- version: '3.2'
- services:
- db:
- # Specify the version of DB you want to run
- image: mysql:5.7
- volumes:
- # TODO: create a directory "db_data" in the root folder of your installation
- - db_data:/var/lib/mysql
- restart: always
- environment:
- # Grab this data from wp-config.php
- # TODO: Update DB_HOST in wp-config.php to "db:port"
- # TODO: Update the database login in wp-config.php to the values set below
- MYSQL_ROOT_PASSWORD: wordpress
- MYSQL_DATABASE: wordpress
- MYSQL_USER: wordpress
- MYSQL_PASSWORD: wordpress
- wordpress:
- entrypoint: apache2-foreground
- depends_on:
- # Tell the WordPress container to talk to the DB container
- - db
- image: jankoch/wordpress:1.0
- ports:
- # Adjust port if necessary to avoid conflicts
- - 8080:80
- restart: always
- volumes:
- # Map your current directory to /var/www/html inside the Docker container
- - .:/var/www/html
- environment:
- # Update login data + table prefix from wp-config.php
- WORDPRESS_DB_HOST: db:3306
- WORDPRESS_DB_PASSWORD: wordpress
- WORDPRESS_TABLE_PREFIX: 'wp_'
- # Optional: start up PhpMyAdmin with WordPress and the DB
- phpmyadmin:
- image: phpmyadmin/phpmyadmin
- depends_on:
- # Tell PhpMyAdmin which DB container to connect to
- - db
- ports:
- - 8889:80
- environment:
- PMA_HOST: db
- volumes:
- db_data:
Add Comment
Please, Sign In to add comment