Guest User

Untitled

a guest
Oct 30th, 2018
215
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.17 KB | None | 0 0
  1. version: "2"
  2. services: # configuring each container
  3. db: # name of our mysql container
  4. image: mysql:5.7 # which image to pull, in this case specifying v. 5.7
  5. volumes: # data to map to the container
  6. - ./data:/docker-entrypoint-initdb.d # where to find our data -- we'll talk more about this
  7. restart: always # always restart the container after reboot
  8. environment: # environment variables -- mysql options in this case
  9. MYSQL_ROOT_PASSWORD: wordpress
  10. MYSQL_DATABASE: wordpress
  11. MYSQL_USER: wordpress
  12. MYSQL_PASSWORD: wordpress
  13. wordpress: # name of our wordpress container
  14. depends_on: # container dependencies that need to be running first
  15. - db
  16. image: wordpress:latest # image used by our container
  17. ports:
  18. - "8000:80" # setting our ports for networking
  19. restart: always
  20. environment:
  21. WORDPRESS_DB_HOST: db:3306 # default mysql port
  22. WORDPRESS_DB_PASSWORD: wordpress # matches the password set in the db container
  23. volumes:
  24. - ./wp-content/themes:/var/www/html/wp-content/themes
  25. - ./wp-content/plugins:/var/www/html/wp-content/plugins
  26. - ./wp-content/uploads:/var/www/html/wp-content/uploads
Add Comment
Please, Sign In to add comment