version: '2'
services:
  mariadb:
    image: mariadb:10.3.32
    restart: always
    environment:
      - MARIADB_USER=angro_admin
      - MARIADB_ROOT_PASSWORD=password12345
      - MARIADB_PASSWORD=password12345
      - MARIADB_DATABASE=angro
    volumes:
      - 'mariadb_data:/var/lib/mysql'
  phpmyadmin:
    image: phpmyadmin
    restart: always
    ports:
      - 8080:80
    environment:
      - PMA_ARBITRARY=1
      - PMA_HOST=mariadb
      - UPLOAD_LIMIT=512M
  opencart:
    image: minicodeltd/angro-md:latest
    ports:
      - '80:80'
      - '443:443'
    environment:
      - OC_HTTP_SERVER=http://angro.md/
      - OC_HTTPS_SERVER=https://angro.md/
      - OC_DB_DRIVER=mysqli
      - OC_DB_HOSTNAME=mariadb
      - OC_DB_USERNAME=angro_admin
      - OC_DB_PASSWORD=password12345
      - OC_DB_DATABASE=angro
      - OC_DB_PORT=3306
      - OC_DB_PREFIX=as_
    depends_on:
      - mariadb
volumes:
  mariadb_data:
    driver: local