docker-compose.yml 1.6 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162
  1. # Mark Shust's Docker Configuration for Magento (https://github.com/markoshust/docker-magento)
  2. # Version 20.0.0
  3. version: "3"
  4. services:
  5. app:
  6. image: markoshust/magento-nginx:1.13-6
  7. ports:
  8. - "80:8000"
  9. - "443:8443"
  10. links:
  11. - db
  12. - phpfpm
  13. volumes: &appvolumes
  14. - ./src:/var/www/html:delegated
  15. - ~/.composer:/var/www/.composer:delegated
  16. - appdata:/sock
  17. # Linux only: uncomment the below volume mounts
  18. - appdata:/var/www/html/app
  19. - appdata:/var/www/html/bin
  20. - appdata:/var/www/html/dev
  21. - appdata:/var/www/html/generated
  22. - appdata:/var/www/html/lib
  23. - appdata:/var/www/html/phpserver
  24. - appdata:/var/www/html/pub
  25. - appdata:/var/www/html/setup
  26. - appdata:/var/www/html/update
  27. - appdata:/var/www/html/var
  28. - appdata:/var/www/html/vendor
  29. phpfpm:
  30. image: markoshust/magento-php:7.2-fpm-0
  31. links:
  32. - db
  33. volumes: *appvolumes
  34. # Linux only: host.docker.internal doesn't exist https://github.com/docker/for-linux/issues/264
  35. # Uncomment two lines below & replace IP with result of: docker run --rm alpine ip route | awk 'NR==1 {print $3}'
  36. #extra_hosts:
  37. # - "host.docker.internal:IP"
  38. # Disabling cron by default as it uses higher CPU, enable if needed
  39. #cron:
  40. # image: markoshust/magento-php:7.2-fpm-0
  41. # user: root
  42. # command: /usr/local/bin/cronstart
  43. # tty: true
  44. # links:
  45. # - db
  46. # volumes: *appvolumes
  47. db:
  48. image: percona:5.7
  49. ports:
  50. - "3306:3306"
  51. env_file: env/db.env
  52. volumes:
  53. - dbdata:/var/lib/mysql
  54. volumes:
  55. appdata:
  56. dbdata: