version: '3.7'

services:
  database:
    image: mariadb
    container_name: mariadb
    ports:
      - "3307:3306"
    environment:
      # think about .env file here
      MYSQL_ROOT_PASSWORD: root
    volumes:
      - ./.db:/var/lib/mysql
    restart: always
    networks:
      - default
  contao:
    build:
      context: ./
      dockerfile: Dockerfile
    image: 'spt-contao'
    container_name: contao
    ports:
      - '8089:80'
      #- '8090:443'
    volumes:
#      - ./cert/mycert.crt:/etc/ssl/certs/mycert.crt
#      - ./cert/mycert.key:/etc/ssl/private/mycert.key
      - ./app:/var/www/html
    networks:
      - default
  phpmyadmin:
    image: phpmyadmin
    container_name: phpmyadmin
    restart: always
    ports:
      - "8080:80"
    environment:
      - PMA_ARBITRARY=1
    networks:
      - default
networks:
  default: