Guest User

Untitled

a guest
Sep 11th, 2018
133
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.15 KB | None | 0 0
  1. version: '3'
  2.  
  3. services:
  4. db:
  5. container_name: database
  6. image: mariadb # Pull mysql image from Docker Hub
  7. ports: # Set up ports exposed for other containers to connect to
  8. - "3306:3306"
  9. volumes:
  10. - ./dep/mysql:/docker-entrypoint-initdb.d
  11. environment: # Set up mysql database name and password
  12. MYSQL_ROOT_PASSWORD: wordpress
  13. MYSQL_DATABASE: wordpress
  14. MYSQL_USER: wordpress
  15. MYSQL_PASSWORD: wordpress
  16. wordpress:
  17. image: wordpress
  18. container_name: wordpress
  19. depends_on:
  20. - db
  21. ports:
  22. - "80:80"
  23. volumes: # Mount relative path source folder on host to absolute path destination folder on docker container
  24. - ./theme:/var/www/html/wp-content/themes/theme_name
  25. - ./dep/plugins:/var/www/html/wp-content/plugins
  26. - ./dep/uploads:/var/www/html/wp-content/uploads
  27. links:
  28. - db
  29. restart: always
  30. environment:
  31. WORDPRESS_DB_HOST: db:3306
  32. WORDPRESS_DB_PASSWORD: wordpress
  33. phpmyadmin:
  34. image: phpmyadmin/phpmyadmin
  35. container_name: phpmyadmin
  36. depends_on:
  37. - db
  38. restart: always
  39. ports:
  40. - "8080:80"
  41. environment:
  42. - PMA_ARBITRARY=1
Add Comment
Please, Sign In to add comment