Advertisement
julianoe

Docker : Wordpress / Mysql

Dec 5th, 2017
147
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.82 KB | None | 0 0
  1. version: "2"
  2. services:
  3. wordpress-ex:
  4. depends_on:
  5. - db
  6. restart: always
  7. image: wordpress:latest
  8. container_name: wordpress-ex
  9. volumes:
  10. - "./volumes/wordpress-ex/wp-content/:/var/www/html/wp-content"
  11. environment:
  12. - WORDPRESS_DB_HOST=db:3306
  13. - WORDPRESS_DB_USER=wordpressex
  14. - WORDPRESS_DB_PASSWORD=PASS
  15. - WORDPRESS_DB_NAME=wordpressex
  16. ports:
  17. - 80:80
  18. - 443:443
  19. networks:
  20. - back
  21.  
  22. db:
  23. restart: always
  24. image: mysql:5.7
  25. container_name: db_wordpress-ex
  26. volumes:
  27. - "./volumes/wordpress-ex/db_data:/var/lib/mysql"
  28. environment:
  29. - MYSQL_ROOT_PASSWORD=ROOTPASS
  30. - MYSQL_DATABASE=wordpresspro
  31. - MYSQL_USER=wordpresspro
  32. - MYSQL_PASSWORD=PASS
  33. networks:
  34. - back
  35.  
  36. networks:
  37. back:
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement