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.

86 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=${WORKSPACE_PUID}
  40. - CUSTOM_PGID=${WORKSPACE_PGID}
  41. - CUSTOM_TZ=${WORKSPACE_TIMEZONE}
  42. - CUSTOM_NODE_VERSION=${WORKSPACE_CUSTOM_NODE_VERSION}
  43. restart: always
  44. volumes:
  45. - ${PROJECTS_DIR}:/var/www
  46. extra_hosts:
  47. - "dockerhost:${DOCKER_HOST_IP}"
  48. secrets:
  49. - user_ssh_key
  50. - user_known_hosts
  51. - composer_auth
  52. db:
  53. image: mariadb
  54. restart: always
  55. environment:
  56. MYSQL_ROOT_PASSWORD: 123456
  57. ports:
  58. - "3306:3306"
  59. pma:
  60. image: phpmyadmin/phpmyadmin
  61. restart: always
  62. environment:
  63. PMA_HOST: db
  64. PMA_USER: root
  65. PMA_PASSWORD: 123456
  66. ports:
  67. - "81:80"
  68. redis:
  69. image: redis
  70. restart: always
  71. command: [ "redis-server", "/usr/local/etc/redis/redis.conf" ]
  72. volumes:
  73. - ./config/redis/redis.conf:/usr/local/etc/redis/redis.conf
  74. # Must be copied into main docker-compose yml-file
  75. volumes:
  76. database:
  77. secrets:
  78. user_ssh_key:
  79. file: ~/.ssh/id_rsa
  80. user_known_hosts:
  81. file: ~/.ssh/known_hosts
  82. composer_auth:
  83. file: ~/.composer/auth.json