# Mark Shust's Docker Configuration for Magento
# (https://github.com/markshust/docker-magento)
#
## Version 40.0.0

version: "3"

services:
  app:
    image: markoshust/magento-nginx:1.18-7
    ports:
      - "80:8000"
      - "443:8443"
    links:
      - db
      - phpfpm
    volumes: &appvolumes
      - ~/.composer:/var/www/.composer:cached
      - appdata:/var/www/html
      - sockdata:/sock
      - ssldata:/etc/nginx/certs

  phpfpm:
    image: markoshust/magento-php:8.1-fpm-0
    links:
      - db
    volumes: *appvolumes

  db:
    image: mariadb:10.4
    command: --max_allowed_packet=64M
    ports:
      - "3306:3306"
    env_file: env/db.env
    volumes:
      - dbdata:/var/lib/mysql

  elasticsearch:
    image: markoshust/magento-elasticsearch:7.16-0
    ports:
      - "9200:9200"
      - "9300:9300"
    environment:
      - "discovery.type=single-node"


volumes:
  appdata:
  dbdata:
  sockdata:
  ssldata:
