Advertisement
Guest User

Untitled

a guest
Sep 17th, 2017
169
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.85 KB | None | 0 0
  1. # A Simple Docker WordPress
  2.  
  3. ## config.env
  4.  
  5. ```
  6. MYSQL_ROOT_PASSWORD=whatever
  7. WORDPRESS_DB_USER=root
  8. WORDPRESS_DB_PASSWORD=whatever
  9. #WORDPRESS_HOST=192.168.1.1
  10. #WORDPRESS_DB_HOST=192.168.1.1
  11. ```
  12.  
  13. ## docker-compose.yml
  14.  
  15. ```
  16. wordpress:
  17. image: wordpress
  18. links:
  19. - mysql
  20. ports:
  21. - 8082:80
  22. env_file:
  23. - config.env
  24. mysql:
  25. image: mysql
  26. ports:
  27. - 3310:3306
  28. env_file:
  29. - config.env
  30. ```
  31.  
  32. ## etc/supervisor/conf.d/wordpress.conf
  33.  
  34. ```
  35. [program:wordpress]
  36. command=docker-compose up
  37. directory=/home/whatever/wordpress
  38. redirect_stderr=true
  39. autostart=true
  40. autorestart=true
  41. priority=10
  42. ```
  43.  
  44. ## README.md
  45.  
  46. ```
  47. # Simple Wordpress Container
  48.  
  49. ## Auto-restart
  50.  
  51. To run automatically:
  52.  
  53. - `sudo apt-get install supervisor` # <-- If necessary
  54. - `sudo cp etc/supervisor/conf.d/wordpress.conf /etc/supervisor/conf.d/wordpress.conf`
  55. - `sudo supervisorctl reload`
  56. ```
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement