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.

85 lines
2.0 KiB

  1. version: '3.6'
  2. services:
  3. nginx:
  4. image: nginx
  5. restart: always
  6. networks:
  7. default:
  8. aliases:
  9. - loc.10ballov
  10. volumes:
  11. - ${PROJECTS_DIR}:/usr/share/nginx/html
  12. - ./config/nginx/conf.d:/etc/nginx/conf.d
  13. - ./config/nginx/includes.d:/etc/nginx/includes.d
  14. - ./log/nginx:/var/log/nginx
  15. ports:
  16. - "80:80"
  17. - "443:443"
  18. expose:
  19. - 80
  20. php-fpm:
  21. build:
  22. context: ./dockerfiles/php-fpm
  23. args:
  24. - INSTALL_REDIS=${INSTALL_REDIS}
  25. - INSTALL_PEAR_MAIL=${INSTALL_PEAR_MAIL}
  26. - PHP_OPT_SHORT_OPEN_TAG=${PHP_OPT_SHORT_OPEN_TAG}
  27. - PHP_OPT_MAX_EXECUTION_TIME=${PHP_OPT_MAX_EXECUTION_TIME}
  28. - PHP_OPT_MEMORY_LIMIT=${PHP_OPT_MEMORY_LIMIT}
  29. - PHP_OPT_UPLOAD_MAX_FILESIZE=${PHP_OPT_UPLOAD_MAX_FILESIZE}
  30. restart: always
  31. volumes:
  32. - ${PROJECTS_DIR}:/usr/share/nginx/html
  33. expose:
  34. - 9000
  35. workspace:
  36. build:
  37. context: ./dockerfiles/workspace
  38. args:
  39. - CUSTOM_PUID=1001
  40. - CUSTOM_PGID=${WORKSPACE_PGID}
  41. - CUSTOM_TZ=${WORKSPACE_TIMEZONE}
  42. restart: always
  43. volumes:
  44. - ${PROJECTS_DIR}:/var/www
  45. extra_hosts:
  46. - "dockerhost:${DOCKER_HOST_IP}"
  47. secrets:
  48. - user_ssh_key
  49. - user_known_hosts
  50. - composer_auth
  51. db:
  52. image: mariadb
  53. restart: always
  54. environment:
  55. MYSQL_ROOT_PASSWORD: 123456
  56. ports:
  57. - "3306:3306"
  58. pma:
  59. image: phpmyadmin/phpmyadmin
  60. restart: always
  61. environment:
  62. PMA_HOST: db
  63. PMA_USER: root
  64. PMA_PASSWORD: 123456
  65. ports:
  66. - "81:80"
  67. redis:
  68. image: redis
  69. restart: always
  70. command: [ "redis-server", "/usr/local/etc/redis/redis.conf" ]
  71. volumes:
  72. - ./config/redis/redis.conf:/usr/local/etc/redis/redis.conf
  73. # Must be copied into main docker-compose yml-file
  74. volumes:
  75. database:
  76. secrets:
  77. user_ssh_key:
  78. file: ~/.ssh/id_rsa
  79. user_known_hosts:
  80. file: ~/.ssh/known_hosts
  81. composer_auth:
  82. file: ~/.composer/auth.json