You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

185 lines
6.2 KiB

3 years ago
3 years ago
3 years ago
  1. version: '2.3'
  2. services:
  3. traefik:
  4. image: traefik:2.4
  5. container_name: traefik
  6. restart: always
  7. command:
  8. - "--accesslog.filepath=/var/log/access.log"
  9. - "--log.level=WARNING"
  10. - "--providers.docker=true"
  11. - "--providers.docker.exposedbydefault=false"
  12. - "--entrypoints.web.address=:80"
  13. - "--entrypoints.websecure.address=:443"
  14. - "--entrypoints.web.http.redirections.entryPoint.to=websecure"
  15. - "--entrypoints.web.http.redirections.entryPoint.scheme=https"
  16. - "--certificatesresolvers.myresolver.acme.httpchallenge=true"
  17. - "--certificatesresolvers.myresolver.acme.httpchallenge.entrypoint=web"
  18. - "--certificatesresolvers.myresolver.acme.storage=/acme.json"
  19. ports:
  20. - 80:80
  21. - 443:443
  22. networks:
  23. - proxy
  24. volumes:
  25. # - /opt/docker/overlays/traefik/var/log:/var/log/
  26. - /opt/docker/overlays/traefik/acme.json:/acme.json
  27. - /var/run/docker.sock:/var/run/docker.sock:ro
  28. nextcloud-db:
  29. image: mariadb
  30. container_name: nextcloud-db
  31. command: --transaction-isolation=READ-COMMITTED --binlog-format=ROW
  32. restart: always
  33. volumes:
  34. - /opt/docker/overlays/nextcloud-db/mysql:/var/lib/mysql
  35. environment:
  36. - MYSQL_ROOT_PASSWORD=AAAAAAAAAAAAAAAAAAAAAAAMYSQLROOT
  37. - MYSQL_PASSWORD=AAAAAAAAAAAAAAAAAAAAAAAAAAAAMYSQL
  38. - MYSQL_DATABASE=nextcloud
  39. - MYSQL_USER=nextcloud
  40. networks:
  41. - nextcloud
  42. - sncf-db
  43. ports:
  44. - "127.0.0.1:3306:3306"
  45. redis:
  46. image: redis:alpine
  47. container_name: nextcloud-redis
  48. restart: always
  49. command: redis-server --requirepass AAAAAAAAAAAAAAAAAAAAAAAAAAAAREDIS
  50. networks:
  51. - nextcloud
  52. nextcloud:
  53. image: nextcloud:e95023790cc36274053af7930831a9aecbf32efd
  54. build: https://github.com/nextcloud/docker.git#e95023790cc36274053af7930831a9aecbf32efd:20.0/fpm-alpine
  55. container_name: nextcloud
  56. restart: always
  57. volumes:
  58. # - /opt/docker/overlays/nextcloud/var/log:/var/log
  59. - /opt/docker/overlays/nextcloud/html:/var/www/html
  60. - /opt/docker/overlays/nextcloud/data:/var/www/data
  61. - /opt/docker/overlays/nextcloud/skeleton:/var/www/skeleton
  62. environment:
  63. - MYSQL_HOST=nextcloud-db
  64. - REDIS_HOST=redis
  65. - REDIS_HOST_PASSWORD=AAAAAAAAAAAAAAAAAAAAAAAAAAAAREDIS
  66. - MYSQL_PASSWORD=AAAAAAAAAAAAAAAAAAAAAAAAAAAAMYSQL
  67. - MYSQL_DATABASE=nextcloud
  68. - MYSQL_USER=nextcloud
  69. depends_on:
  70. - nextcloud-db
  71. - redis
  72. security_opt:
  73. - no-new-privileges:true
  74. networks:
  75. - nextcloud
  76. - nextcloud-web
  77. nextcloud-web:
  78. build: ../build/nextcloud-web
  79. container_name: nextcloud-web
  80. restart: always
  81. volumes:
  82. # - /opt/docker/overlays/nextcloud-web/var/log:/var/log
  83. - /opt/docker/overlays/nextcloud/html:/var/www/html:ro
  84. - /opt/docker/overlays/nextcloud/data:/var/www/data:ro
  85. - /opt/docker/overlays/nextcloud/skeleton:/var/www/skeleton:ro
  86. labels:
  87. - traefik.docker.network=proxy
  88. - traefik.enable=true
  89. - traefik.protocol=http
  90. - traefik.port=80
  91. - traefik.http.routers.nextlcoud.tls=true
  92. - traefik.http.routers.nextcloud.entrypoints=websecure
  93. - traefik.http.routers.nextcloud.tls.certresolver=myresolver
  94. - traefik.http.routers.nextcloud.rule=Host(`oleola.ddns.net`)
  95. - traefik.http.middlewares.nextcloud.headers.customRequestHeaders.X-Forwarded-Proto=https
  96. - traefik.http.routers.nextcloud.middlewares=nextcloud,nextcloud_redirect, next-auth
  97. # - traefik.http.middlewares.next-auth.basicauth.users=<output>
  98. - traefik.http.middlewares.nextcloud.headers.stsSeconds=155520011
  99. - traefik.http.middlewares.nextcloud.headers.stsIncludeSubdomains=true
  100. - traefik.http.middlewares.nextcloud.headers.stsPreload=true
  101. - traefik.http.middlewares.nextcloud_redirect.redirectregex.regex=/.well-known/(card|cal)dav
  102. - traefik.http.middlewares.nextcloud_redirect.redirectregex.replacement=/remote.php/dav/
  103. depends_on:
  104. - nextcloud
  105. security_opt:
  106. - no-new-privileges:true
  107. networks:
  108. - nextcloud
  109. - proxy
  110. - nextcloud-web
  111. # logging:
  112. # driver: syslog
  113. cron:
  114. image: nextcloud:stable-fpm-alpine
  115. restart: always
  116. container_name: nextcloud-cron
  117. volumes:
  118. - /opt/docker/overlays/nextcloud/html:/var/www/html
  119. - /opt/docker/overlays/nextcloud/data:/var/www/data
  120. - /opt/docker/overlays/nextcloud/skeleton:/var/www/skeleton
  121. entrypoint: /cron.sh
  122. depends_on:
  123. - nextcloud-db
  124. - redis
  125. networks:
  126. - nextcloud
  127. - proxy
  128. # deb-rust-sncf:
  129. # build: ../build/deb-rust-sncf
  130. # container_name: deb-rust-sncf
  131. # restart: always
  132. # volumes:
  133. ## - /opt/docker/overlays/deb-rust-sncf/var/log:/var/log
  134. # - /opt/docker/overlays/nextcloud/html:/var/www/html
  135. # - /opt/docker/overlays/nextcloud/data:/var/www/data
  136. # - /opt/docker/overlays/nextcloud/skeleton:/var/www/skeleton
  137. # labels:
  138. # - "traefik.docker.network=proxy"
  139. # - "traefik.enable=true"
  140. # - "traefik.protocol=http"
  141. # - "traefik.port=8000"
  142. # - "traefik.http.routers.deb-rust-sncf.entrypoints=websecure"
  143. # - "traefik.http.routers.deb-rust-sncf.tls.certresolver=myresolver"
  144. # - "traefik.http.routers.deb-rust-sncf.rule=Host(`example.org`)"
  145. # - "traefik.http.services.deb-rust-sncf.loadbalancer.server.port=8000"
  146. # - "traefik.http.routers.deb-rust-sncf.middlewares=sncf, sncf-auth"
  147. # - "traefik.http.middlewares.sncf-auth.basicauth.users=<output>
  148. # - "traefik.http.middlewares.sncf.headers.customRequestHeaders.X-Forwarded-Proto=https"
  149. # - "traefik.http.middlewares.sncf.headers.stsSeconds=155520011"
  150. # - "traefik.http.middlewares.sncf.headers.stsIncludeSubdomains=true"
  151. # - "traefik.http.middlewares.sncf.headers.stsPreload=true"
  152. # - "traefik.http.middlewares.sncf-ratelimit.ratelimit.average=200"
  153. # environment:
  154. # - RUST_BACKTRACE=full
  155. # depends_on:
  156. # - nextcloud
  157. # networks:
  158. # - sncf-db
  159. # - sncf-nc
  160. # - proxy
  161. networks:
  162. proxy:
  163. external: true
  164. nextcloud:
  165. external: false
  166. driver: bridge
  167. nextcloud-web:
  168. external: false
  169. driver: bridge
  170. sncf-nc:
  171. external: false
  172. driver: bridge
  173. sncf-db:
  174. external: false
  175. driver: bridge