Guest User

Untitled

a guest
Dec 29th, 2018
144
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.29 KB | None | 0 0
  1. version: '3.2'
  2. services:
  3. db:
  4. # Specify the version of DB you want to run
  5. image: mysql:5.7
  6. volumes:
  7. # TODO: create a directory "db_data" in the root folder of your installation
  8. - db_data:/var/lib/mysql
  9. restart: always
  10. environment:
  11. # Grab this data from wp-config.php
  12. # TODO: Update DB_HOST in wp-config.php to "db:port"
  13. # TODO: Update the database login in wp-config.php to the values set below
  14. MYSQL_ROOT_PASSWORD: wordpress
  15. MYSQL_DATABASE: wordpress
  16. MYSQL_USER: wordpress
  17. MYSQL_PASSWORD: wordpress
  18.  
  19. wordpress:
  20. entrypoint: apache2-foreground
  21. depends_on:
  22. # Tell the WordPress container to talk to the DB container
  23. - db
  24. image: jankoch/wordpress:1.0
  25. ports:
  26. # Adjust port if necessary to avoid conflicts
  27. - 8080:80
  28. restart: always
  29. volumes:
  30. # Map your current directory to /var/www/html inside the Docker container
  31. - .:/var/www/html
  32. environment:
  33. # Update login data + table prefix from wp-config.php
  34. WORDPRESS_DB_HOST: db:3306
  35. WORDPRESS_DB_PASSWORD: wordpress
  36. WORDPRESS_TABLE_PREFIX: 'wp_'
  37.  
  38. # Optional: start up PhpMyAdmin with WordPress and the DB
  39. phpmyadmin:
  40. image: phpmyadmin/phpmyadmin
  41. depends_on:
  42. # Tell PhpMyAdmin which DB container to connect to
  43. - db
  44. ports:
  45. - 8889:80
  46. environment:
  47. PMA_HOST: db
  48.  
  49. volumes:
  50. db_data:
Add Comment
Please, Sign In to add comment