docker-compose.yml 1.7 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465
  1. version: "3"
  2. services:
  3. nginx:
  4. build: nginx
  5. image: ${DOCKER_PREFIX}-nginx
  6. container_name: ${DOCKER_PREFIX}-nginx
  7. ports:
  8. - ${DOCKER_NGINX_PORT}:80
  9. volumes:
  10. - ./../:/var/www/balticrest.ru
  11. depends_on:
  12. - php-fpm
  13. php-fpm:
  14. build: php-fpm
  15. image: ${DOCKER_PREFIX}-php-fpm
  16. container_name: ${DOCKER_PREFIX}-php-fpm
  17. environment:
  18. PHP_IDE_CONFIG: "serverName=${DOCKER_PREFIX}"
  19. ports:
  20. - 9000
  21. volumes:
  22. - ./../:/var/www/balticrest.ru
  23. depends_on:
  24. - mysql
  25. mysql:
  26. build: mysql
  27. image: ${DOCKER_PREFIX}-mysql
  28. container_name: ${DOCKER_PREFIX}-mysql
  29. ports:
  30. - ${DOCKER_MYSQL_PORT}:3306
  31. volumes:
  32. - ./mysql/data:/var/lib/mysql
  33. environment:
  34. - MYSQL_ROOT_PASSWORD=${DOCKER_MYSQL_ROOT_PASSWORD}
  35. - MYSQL_DATABASE=${DOCKER_MYSQL_DATABASE}
  36. - MYSQL_USER=${DOCKER_MYSQL_USER}
  37. - MYSQL_PASSWORD=${DOCKER_MYSQL_PASSWORD}
  38. pma:
  39. build: pma
  40. image: ${DOCKER_PREFIX}-pma
  41. container_name: ${DOCKER_PREFIX}-pma
  42. ports:
  43. - ${DOCKER_PMA_PORT}:80
  44. depends_on:
  45. - mysql
  46. environment:
  47. - PMA_HOST=mysql
  48. - PMA_USER=${DOCKER_MYSQL_USER}
  49. - PMA_PASSWORD=${DOCKER_MYSQL_PASSWORD}
  50. volumes:
  51. - ./mysql/data:/var/lib/mysql
  52. supervisor:
  53. build: supervisor
  54. image: ${DOCKER_PREFIX}-supervisor
  55. container_name: ${DOCKER_PREFIX}-supervisor
  56. volumes:
  57. - ./../:/var/www/balticrest.ru
  58. depends_on:
  59. - php-fpm