Advertisement
Guest User

Untitled

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