Вы не можете выбрать более 25 тем Темы должны начинаться с буквы или цифры, могут содержать дефисы(-) и должны содержать не более 35 символов.

docker-compose.yml 3.0KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798
  1. ---
  2. networks:
  3. default:
  4. name: ${PREFIX}
  5. services:
  6. adminer:
  7. container_name: ${PREFIX}-adminer
  8. dns:
  9. - 1.1.1.1
  10. hostname: ${PREFIX}-adminer
  11. image: adminer:4.8.1-standalone
  12. labels:
  13. - traefik.enable=true
  14. - traefik.http.routers.${PREFIX}-adminer.entrypoints=https
  15. - traefik.http.routers.${PREFIX}-adminer.rule=Host(`adminer.${APP_URL}`)
  16. - traefik.http.routers.${PREFIX}-adminer.tls=true
  17. - traefik.http.services.${PREFIX}-adminer.loadbalancer.server.port=8080
  18. app:
  19. container_name: ${PREFIX}-app
  20. dns:
  21. - 1.1.1.1
  22. environment:
  23. - PHP_POST_MAX_SIZE=${PHP_POST_MAX_SIZE}
  24. - PHP_UPLOAD_MAX_FILESIZE=${PHP_UPLOAD_MAX_FILESIZE}
  25. - XDEBUG_CLIENT_HOST=${XDEBUG_CLIENT_HOST}
  26. - XDEBUG_MODE=${XDEBUG_MODE}
  27. hostname: ${PREFIX}-app
  28. image: ${APP_IMAGE_TAG}
  29. labels:
  30. - traefik.enable=true
  31. - traefik.http.routers.${PREFIX}-web.entrypoints=http
  32. - traefik.http.routers.${PREFIX}-web.middlewares=https-redirect@file
  33. - traefik.http.routers.${PREFIX}-web.rule=Host(`${APP_URL}`)
  34. - traefik.http.routers.${PREFIX}-webssl.entrypoints=https
  35. - traefik.http.routers.${PREFIX}-webssl.rule=Host(`${APP_URL}`)
  36. - traefik.http.routers.${PREFIX}-webssl.tls=true
  37. - traefik.http.services.${PREFIX}-webssl.loadbalancer.server.port=80
  38. volumes:
  39. - root:/root
  40. - webroot:/var/www/html
  41. - wp-cli-cache:/var/www/.wp-cli
  42. db:
  43. command: --default-authentication-plugin=mysql_native_password
  44. container_name: ${PREFIX}-db
  45. environment:
  46. MYSQL_DATABASE: ${DB_NAME}
  47. MYSQL_PASSWORD: ${DB_USER_PASSWORD}
  48. MYSQL_ROOT_PASSWORD: ${DB_ROOT_PASSWORD}
  49. MYSQL_USER: ${DB_USER}
  50. hostname: ${PREFIX}-db
  51. image: mariadb:10.4.6-bionic
  52. ports:
  53. - "${TRAEFIK_LISTENING_IP}:3306:3306"
  54. volumes:
  55. - db:/var/lib/mysql
  56. traefik:
  57. container_name: ${PREFIX}-traefik
  58. command: ["--configFile=/etc/traefik/static/traefik.yml"]
  59. dns:
  60. - 1.1.1.1
  61. image: traefik:2.5.3
  62. labels:
  63. - traefik.enable=true
  64. - traefik.http.routers.${PREFIX}-traefik.entrypoints=https
  65. - traefik.http.routers.${PREFIX}-traefik.rule=Host(`traefik.${APP_URL}`)
  66. - traefik.http.routers.${PREFIX}-traefik.service=api@internal
  67. - traefik.http.routers.${PREFIX}-traefik.tls=true
  68. ports:
  69. - "${TRAEFIK_LISTENING_IP}:80:80"
  70. - "${TRAEFIK_LISTENING_IP}:443:443"
  71. volumes:
  72. - /etc/localtime:/etc/localtime:ro
  73. - /var/run/docker.sock:/var/run/docker.sock:ro
  74. - traefik-certs:/certs:ro
  75. - traefik-dynamic:/etc/traefik/dynamic:ro
  76. - traefik-logs:/logs
  77. - traefik-static:/etc/traefik/static:ro
  78. version: "3.4"
  79. volumes:
  80. db:
  81. name: ${PREFIX}-db
  82. root:
  83. name: ${PREFIX}-root
  84. traefik-certs:
  85. name: ${PREFIX}-traefik-certs
  86. traefik-dynamic:
  87. name: ${PREFIX}-traefik-dynamic
  88. traefik-logs:
  89. name: ${PREFIX}-traefik-logs
  90. traefik-static:
  91. name: ${PREFIX}-traefik-static
  92. webroot:
  93. name: ${PREFIX}-webroot
  94. wp-cli-cache:
  95. name: wp-cli-cache