smaction

compose yaml file

Apr 13th, 2020
148
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.72 KB | None | 0 0
  1. version: '3.3'
  2.  
  3. services:
  4. wordpress:
  5. depends_on:
  6. - db
  7. # image: scott:latest
  8. image: wordpress:latest
  9. # remember to comment out volumes statements when using scott:latest
  10. volumes:
  11. - ./wp-content:/var/www/html/wp-content
  12. ports:
  13. - "8000:80"
  14. restart: always
  15. environment:
  16. WORDPRESS_DB_HOST: db:3306
  17. WORDPRESS_DB_USER: wordpress
  18. WORDPRESS_DB_PASSWORD: w0rdcamp
  19.  
  20. db:
  21. image: mysql:5.7
  22. volumes:
  23. - db_data:/var/lib/mysql
  24. restart: always
  25. environment:
  26. MYSQL_ROOT_PASSWORD: secret
  27. MYSQL_DATABASE: wordpress
  28. MYSQL_USER: wordpress
  29. MYSQL_PASSWORD: w0rdcamp
  30. volumes:
  31. db_data:
Advertisement
Add Comment
Please, Sign In to add comment