Advertisement
Guest User

teste

a guest
Dec 8th, 2016
89
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.87 KB | None | 0 0
  1. version: '2'
  2.  
  3. services:
  4. #proxy
  5. nginx:
  6. image: nginx
  7. container_name: nginx
  8. ports:
  9. - 80:80
  10. - 443:443
  11. volumes:
  12. - ./proxy/conf.d:/etc/nginx/conf.d
  13. - ./proxy/vhost.d:/etc/nginx/vhost.d
  14. - ./proxy/html:/usr/share/nginx/html
  15. - ./proxy/certs:/etc/nginx/certs:ro
  16. networks:
  17. - proxy-tier
  18.  
  19. #proxy-file-generator
  20. nginx-gen:
  21. image: jwilder/docker-gen
  22. container_name: nginx-gen
  23. volumes:
  24. - /var/run/docker.sock:/tmp/docker.sock:ro
  25. - ./proxy/templates/nginx.tmpl:/etc/docker-gen/templates/nginx.tmpl:ro
  26. volumes_from:
  27. - nginx
  28. entrypoint: /usr/local/bin/docker-gen -notify-sighup nginx -watch -only-exposed -wait 5s:30s /etc/docker-gen/templates/nginx.tmpl /etc/nginx/conf.d/default.conf
  29.  
  30. #letsencrypt
  31. letsencrypt-nginx-proxy-companion:
  32. image: jrcs/letsencrypt-nginx-proxy-companion
  33. container_name: letsencrypt-companion
  34. depends_on: [nginx-gen]
  35. volumes_from:
  36. - nginx
  37. volumes:
  38. - /var/run/docker.sock:/var/run/docker.sock:ro
  39. - ./proxy/certs:/etc/nginx/certs:rw
  40. environment:
  41. - NGINX_DOCKER_GEN_CONTAINER=nginx-gen
  42.  
  43. #app
  44. nextcloud:
  45. image: wonderfall/nextcloud
  46. container_name: nextcloud
  47. links:
  48. - db_nextcloud:db_nextcloud
  49. environment:
  50. - UID=1000
  51. - GID=1000
  52. volumes:
  53. - ./nextcloud/data:/data
  54. - ./nextcloud/config:/config
  55. - ./nextcloud/apps:/apps2
  56. environment:
  57. - VIRTUAL_HOST=domain_name
  58. - VIRTUAL_NETWORK=nginx-proxy
  59. - VIRTUAL_PORT=80
  60. - LETSENCRYPT_HOST=domain_name
  61. - LETSENCRYPT_EMAIL=certificate_mail_address
  62. networks:
  63. - proxy-tier
  64. depends_on:
  65. - letsencrypt-nginx-proxy-companion
  66.  
  67. db_nextcloud: #database
  68. image: mariadb:10
  69. container_name: db_nextcloud
  70. volumes:
  71. - ./nextcloud/db:/var/lib/mysql
  72. environment:
  73. - MYSQL_ROOT_PASSWORD=root_password
  74. - MYSQL_DATABASE=nextcloud
  75. - MYSQL_USER=nextcloud
  76. - MYSQL_PASSWORD=database_password
  77. networks:
  78. - proxy-tier
  79. depends_on:
  80. - letsencrypt-nginx-proxy-companion
  81.  
  82. networks:
  83. proxy-tier:
  84. external:
  85. name: nginx-proxy
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement