Guest User

Untitled

a guest
Jun 25th, 2018
78
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 3.87 KB | None | 0 0
  1. version: '3'
  2.  
  3. services:
  4. traefik:
  5. image: traefik # The official Traefik docker image
  6. container_name: traefik-docker-compose
  7. restart: always
  8. command: --api --docker
  9. labels:
  10. - "traefik.enable=true"
  11. - "traefik.port=8080"
  12. ports:
  13. - "80:80" # The HTTP port
  14. - "443:443"
  15. - "8080:8080" # The Web UI (enabled by --api)
  16. volumes:
  17. - /var/run/docker.sock:/var/run/docker.sock # So that Traefik can listen to the Docker events
  18. - /opt/traefik/traefik.toml:/traefik.toml
  19. - /opt/traefik/log:/var/log/traefik
  20. labels:
  21. - "traefik.frontend.rule=Host:traefik.observer.localhost"
  22. whoami:
  23. image: emilevauge/whoami # A container that exposes an API to show its IP address
  24. container_name: whoami-docker-compose
  25. labels:
  26. - "traefik.frontend.rule=Host:whoami.observer.localhost"
  27. api:
  28. image: 163.83.21.153:5000/php:apiSSL
  29. container_name: api-docker-compose
  30. restart: always
  31. expose:
  32. - "443"
  33. volumes:
  34. - /volumes/api:/var/www/html
  35. labels:
  36. - "traefik.enable=true"
  37. - "traefik.basic.frontend.rule=Host:api.observer.localhost"
  38. - traefik.protocol=https
  39. - traefik.basic.port=443
  40.  
  41. ################################################################
  42. # Global configuration
  43. ################################################################
  44.  
  45. # Enable debug mode
  46. #
  47. # Optional
  48. # Default: false
  49. #
  50. debug = true
  51.  
  52. # Log level
  53. #
  54. # Optional
  55. # Default: "ERROR"
  56. #
  57. logLevel = "DEBUG"
  58.  
  59. # Entrypoints to be used by frontends that do not specify any entrypoint.
  60. # Each frontend can specify its own entrypoints.
  61. #
  62. # Optional
  63. # Default: ["http"]
  64. #
  65. defaultEntryPoints = ["https", "http"]
  66.  
  67. ################################################################
  68. # Entrypoints configuration
  69. ################################################################
  70.  
  71. # Entrypoints definition
  72. #
  73. # Optional
  74. # Default:
  75. [entryPoints]
  76. [entryPoints.http]
  77. address = ":80"
  78. # [entryPoints.http.redirect]
  79. # entryPoint = "https"
  80. [entryPoints.https]
  81. address = ":443"
  82. [entryPoints.https.tls]
  83.  
  84. ################################################################
  85. # Traefik logs configuration
  86. ################################################################
  87.  
  88. # Traefik logs
  89. # Enabled by default and log to stdout
  90. #
  91. # Optional
  92. #
  93. [traefikLog]
  94.  
  95. # Sets the filepath for the traefik log. If not specified, stdout will be used.
  96. # Intermediate directories are created if necessary.
  97. #
  98. # Optional
  99. # Default: os.Stdout
  100. #
  101. # filePath = "log/traefik.log"
  102.  
  103. # Format is either "json" or "common".
  104. #
  105. # Optional
  106. # Default: "common"
  107. #
  108. # format = "common"
  109.  
  110. ################################################################
  111. # API and dashboard configuration
  112. ################################################################
  113.  
  114. # Enable API and dashboard
  115. [api]
  116.  
  117. # Name of the related entry point
  118. #
  119. # Optional
  120. # Default: "traefik"
  121. #
  122. entryPoint = "traefik"
  123.  
  124. # Enabled Dashboard
  125. #
  126. # Optional
  127. # Default: true
  128. #
  129. # dashboard = false
  130.  
  131. ################################################################
  132. # Ping configuration
  133. ################################################################
  134.  
  135. # Enable ping
  136. [ping]
  137.  
  138. # Name of the related entry point
  139. #
  140. # Optional
  141. # Default: "traefik"
  142. #
  143. # entryPoint = "traefik"
  144.  
  145. ################################################################
  146. # Docker configuration backend
  147. ################################################################
  148. # Enable Docker configuration backend
  149. [docker]
  150.  
  151. # Docker server endpoint. Can be a tcp or a unix socket endpoint.
  152. #
  153. # Required
  154. # Default: "unix:///var/run/docker.sock"
  155. #
  156. # endpoint = "tcp://10.10.10.10:2375"
  157. # Default domain used.
  158. # Can be overridden by setting the "traefik.domain" label on a container.
  159. #
  160. # Optional
  161. # Default: ""
  162. #
  163. domain = "observer.localhost"
  164.  
  165. watch = true
  166. exposedByDefault = false
  167.  
  168. # Expose containers by default in traefik
  169. #
  170. # Optional
  171. # Default: true
  172. #
  173. # exposedByDefault = true
Add Comment
Please, Sign In to add comment