Advertisement
Guest User

Untitled

a guest
Oct 30th, 2018
219
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 4.50 KB | None | 0 0
  1. version: '2.3'
  2.  
  3. x-lagoon-project:
  4. &lagoon-project adyax-infopro
  5.  
  6. x-volumes:
  7. &default-volumes
  8. # Define all volumes you would like to have real-time mounted into the docker containers
  9. volumes:
  10. - .:/app:delegated
  11.  
  12. x-environment:
  13. &default-environment
  14. LAGOON_PROJECT: *lagoon-project
  15. LAGOON_ROUTE: http://ip-events.docker.amazee.io
  16. # Uncomment if you like to have the system behave like in production
  17. #LAGOON_ENVIRONMENT_TYPE: production
  18. # Uncomment to enable xdebug and then restart via `docker-compose up -d`
  19. XDEBUG_ENABLE: "true"
  20.  
  21. x-user:
  22. &default-user
  23. # The default user under which the containers should run. Change this if you are on linux and run with another user than id `1000`
  24. user: '1000'
  25.  
  26. services:
  27.  
  28. cli: # cli container, will be used for executing composer and any local commands (drush, drupal, etc.)
  29. build:
  30. context: .
  31. dockerfile: Dockerfile.cli
  32. image: *lagoon-project # this image will be reused as `CLI_IMAGE` in subsequent Docker builds
  33. labels:
  34. # Lagoon Labels
  35. lagoon.type: cli-persistent
  36. lagoon.persistent.name: nginx # mount the persistent storage of nginx into this container
  37. lagoon.persistent: /app/web/sites/default/files/ # location where the persistent storage should be mounted
  38. << : *default-volumes # loads the defined volumes from the top
  39. user: root
  40. volumes_from: # mount the ssh-agent from the pygmy or cachalot ssh-agent
  41. - container:amazeeio-ssh-agent
  42. environment:
  43. << : *default-environment # loads the defined environment variables from the top
  44.  
  45. nginx:
  46. build:
  47. context: .
  48. dockerfile: Dockerfile.nginx
  49. args:
  50. CLI_IMAGE: *lagoon-project # Inject the name of the cli image
  51. labels:
  52. lagoon.type: nginx-php-persistent
  53. lagoon.persistent: /app/web/sites/default/files/ # define where the persistent storage should be mounted too
  54. << : *default-volumes # loads the defined volumes from the top
  55. << : *default-user # uses the defined user from top
  56. depends_on:
  57. - cli # basically just tells docker-compose to build the cli first
  58. environment:
  59. << : *default-environment # loads the defined environment variables from the top
  60. LAGOON_LOCALDEV_URL: ip-events.docker.amazee.io # generate another route for nginx, by default we go to varnish
  61. networks:
  62. - amazeeio-network
  63. - default
  64.  
  65. php:
  66. build:
  67. context: .
  68. dockerfile: Dockerfile.php
  69. args:
  70. CLI_IMAGE: *lagoon-project
  71. labels:
  72. lagoon.type: nginx-php-persistent
  73. lagoon.name: nginx # we want this service be part of the nginx pod in Lagoon
  74. lagoon.persistent: /app/web/sites/default/files/ # define where the persistent storage should be mounted too
  75. << : *default-volumes # loads the defined volumes from the top
  76. << : *default-user # uses the defined user from top
  77. depends_on:
  78. - cli # basically just tells docker-compose to build the cli first
  79. environment:
  80. << : *default-environment # loads the defined environment variables from the top
  81.  
  82. mariadb:
  83. image: amazeeio/mariadb-galera-drupal
  84. labels:
  85. lagoon.type: mariadb
  86. ports:
  87. - "3306" # exposes the port 3306 with a random local port, find it with `docker-compose port mariadb 3306`
  88. << : *default-user # uses the defined user from top
  89. environment:
  90. << : *default-environment
  91.  
  92. redis:
  93. image: amazeeio/redis
  94. labels:
  95. lagoon.type: redis
  96. << : *default-user # uses the defined user from top
  97. environment:
  98. << : *default-environment
  99.  
  100. solr:
  101. image: amazeeio/solr:6.6-drupal
  102. labels:
  103. lagoon.type: solr
  104. << : *default-user # uses the defined user from top
  105. ports:
  106. - "8983" # exposes the port 8983 with a random local port, find it with `docker-compose port solr 8983`
  107. environment:
  108. << : *default-environment
  109.  
  110.  
  111. varnish:
  112. image: amazeeio/varnish-drupal
  113. labels:
  114. lagoon.type: varnish
  115. links:
  116. - nginx # links varnish to the nginx in this docker-compose project, or it would try to connect to any nginx running in docker
  117. << : *default-user # uses the defined user from top
  118. environment:
  119. << : *default-environment
  120. VARNISH_BYPASS: "true" # by default we bypass varnish, change to 'false' or remove in order to tell varnish to cache if possible
  121. networks:
  122. - amazeeio-network
  123. - default
  124.  
  125. networks:
  126. amazeeio-network:
  127. external: true
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement