version: '3'

services:

  mariadb:
    image: 'docker.io/bitnami/mariadb:10.1-debian-10'
    environment:
      - MARIADB_USER=bn_prestashop
      - MARIADB_DATABASE=bitnami_prestashop
      - ALLOW_EMPTY_PASSWORD=yes
    ports:
      - '3319:3306'
    volumes:
      - 'mariadb_data:/bitnami'
      - '.:/srv'

  prestashop:
    image: 'docker.io/bitnami/prestashop:1.7-debian-10'
    environment:
      - MARIADB_HOST=mariadb
      - MARIADB_PORT_NUMBER=3306
      - PRESTASHOP_HOST=localhost
      - PRESTASHOP_DATABASE_USER=bn_prestashop
      - PRESTASHOP_DATABASE_NAME=bitnami_prestashop
      - ALLOW_EMPTY_PASSWORD=yes
    ports:
      - '80:80'
      - '443:443'
    volumes:
      - 'prestashop_data:/bitnami'
    depends_on:
      - mariadb

  mailhog:
    image: mailhog/mailhog
    ports:
      - '1025:1025'
      - '8025:8025'

volumes:
  mariadb_data:
    driver: local
  prestashop_data:
    driver: local
