Advertisement
Guest User

Untitled

a guest
Dec 9th, 2019
242
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.53 KB | None | 0 0
  1. version: '3'
  2.  
  3. services:
  4. db:
  5. image: mysql:8.0
  6. container_name: db
  7. restart: unless-stopped
  8. env_file: .env
  9. environment:
  10. - MYSQL_DATABASE=wordpress
  11. volumes:
  12. - dbdata:/var/lib/mysql
  13. command: '--default-authentication-plugin=mysql_native_password'
  14. networks:
  15. - app-network
  16.  
  17. wordpress:
  18. depends_on:
  19. - db
  20. image: wordpress:5.1.1-fpm-alpine
  21. container_name: wordpress
  22. restart: unless-stopped
  23. env_file: .env
  24. environment:
  25. - WORDPRESS_DB_HOST=db:3306
  26. - WORDPRESS_DB_USER=$MYSQL_USER
  27. - WORDPRESS_DB_PASSWORD=$MYSQL_PASSWORD
  28. - WORDPRESS_DB_NAME=wordpress
  29. volumes:
  30. - wordpress:/var/www/html
  31. networks:
  32. - app-network
  33.  
  34. webserver:
  35. depends_on:
  36. - wordpress
  37. image: nginx:1.15.12-alpine
  38. container_name: webserver
  39. restart: unless-stopped
  40. ports:
  41. - "80:80"
  42. - "443:443"
  43. volumes:
  44. - wordpress:/var/www/html
  45. - ./nginx-conf:/etc/nginx/conf.d
  46. - certbot-etc:/etc/letsencrypt
  47. networks:
  48. - app-network
  49.  
  50. certbot:
  51. depends_on:
  52. - webserver
  53. image: certbot/certbot
  54. container_name: certbot
  55. volumes:
  56. - certbot-etc:/etc/letsencrypt
  57. - wordpress:/var/www/html
  58. command: certonly --webroot --webroot-path=/var/www/html --email sammy@example.com --agree-tos --no-eff-email --force-renewal -d example.com -d www.example.com
  59.  
  60. volumes:
  61. certbot-etc:
  62. wordpress:
  63. dbdata:
  64.  
  65. networks:
  66. app-network:
  67. driver: bridge
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement