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.

84 lines
1.9 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_PEAR_MAIL=${INSTALL_PEAR_MAIL}
  25. - PHP_OPT_SHORT_OPEN_TAG=${PHP_OPT_SHORT_OPEN_TAG}
  26. - PHP_OPT_MAX_EXECUTION_TIME=${PHP_OPT_MAX_EXECUTION_TIME}
  27. - PHP_OPT_MEMORY_LIMIT=${PHP_OPT_MEMORY_LIMIT}
  28. - PHP_OPT_UPLOAD_MAX_FILESIZE=${PHP_OPT_UPLOAD_MAX_FILESIZE}
  29. restart: always
  30. volumes:
  31. - ${PROJECTS_DIR}:/usr/share/nginx/html
  32. expose:
  33. - 9000
  34. workspace:
  35. build:
  36. context: ./dockerfiles/workspace
  37. args:
  38. - PUID=${WORKSPACE_PUID}
  39. - PGID=${WORKSPACE_PGID}
  40. - TZ=${WORKSPACE_TIMEZONE}
  41. restart: always
  42. volumes:
  43. - ${PROJECTS_DIR}:/var/www
  44. extra_hosts:
  45. - "dockerhost:${DOCKER_HOST_IP}"
  46. secrets:
  47. - user_ssh_key
  48. - user_known_hosts
  49. - composer_auth
  50. db:
  51. image: mariadb
  52. restart: always
  53. environment:
  54. MYSQL_ROOT_PASSWORD: 123456
  55. ports:
  56. - "3306:3306"
  57. pma:
  58. image: phpmyadmin/phpmyadmin
  59. restart: always
  60. environment:
  61. PMA_HOST: db
  62. PMA_USER: root
  63. PMA_PASSWORD: 123456
  64. ports:
  65. - "81:80"
  66. redis:
  67. image: redis
  68. restart: always
  69. command: [ "redis-server", "/usr/local/etc/redis/redis.conf" ]
  70. volumes:
  71. - ./config/redis/redis.conf:/usr/local/etc/redis/redis.conf
  72. # Must be copied into main docker-compose yml-file
  73. volumes:
  74. database:
  75. secrets:
  76. user_ssh_key:
  77. file: ~/.ssh/id_rsa
  78. user_known_hosts:
  79. file: ~/.ssh/known_hosts
  80. composer_auth:
  81. file: ~/.composer/auth.json