organicnz

Untitled

Jan 28th, 2021
87
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.95 KB | None | 0 0
  1. version: '3.7'
  2.  
  3. services:
  4. db:
  5. image: mysql:8.0.23
  6. container_name: db
  7. restart: unless-stopped
  8. env_file: .env
  9. environment:
  10. - MYSQL_DATABASE=hybridized
  11. volumes:
  12. - "${PWD}/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.6.0-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=hybridized
  29. volumes:
  30. - "${PWD}/hybridized:/var/www/html"
  31. - "${PWD}/files/wp-content:/var/www/html/wp-content"
  32. - "${PWD}/files/uploads.ini:/usr/local/etc/php/conf.d/uploads.ini"
  33. #command: 'chmod 777 -R www-data /var/www/html'
  34. #command: 'chown -R www-data:www-data /var/www/html'
  35. networks:
  36. - app-network
  37.  
  38. webserver:
  39. depends_on:
  40. - wordpress
  41. image: nginx:1.19.6-alpine
  42. container_name: webserver
  43. restart: unless-stopped
  44. ports:
  45. - "80:80"
  46. - "443:443"
  47. volumes:
  48. - "${PWD}/hybridized:/var/www/html"
  49. - "${PWD}/nginx-conf:/etc/nginx/conf.d"
  50. - "certbot-etc:/etc/letsencrypt"
  51. #command: 'chmod 777 -R www-data /var/www/html'
  52. #command: 'chown -R www-data:www-data /var/www/html'
  53. networks:
  54. - app-network
  55.  
  56. certbot:
  57. depends_on:
  58. - webserver
  59. image: certbot/certbot
  60. container_name: certbot
  61. volumes:
  62. - "certbot-etc:/etc/letsencrypt"
  63. - "${PWD}/hybridized:/var/www/html"
  64. command: certonly --webroot --webroot-path=/var/www/html --email [email protected] --agree-tos --no-eff-email --force-renewal -d example.com -d www.example.com
  65.  
  66. volumes:
  67. certbot-etc:
  68. hybridized:
  69. dbdata:
  70.  
  71. networks:
  72. app-network:
  73. driver: bridge
Advertisement
Add Comment
Please, Sign In to add comment