version: '3.7'
name: probuddy

services:
  database:
    image: mariadb
    container_name: pb-mariadb
    ports:
      - "3398:3306"
    environment:
      # think about .env file here
      MYSQL_ROOT_PASSWORD: root
    volumes:
      - ./../.db:/var/lib/mysql
    restart: always
    networks:
      - default
  pbuddy:
    build:
      context: ./
      dockerfile: Dockerfile
    image: 'pb_spt_image'
    container_name: pb-php
    ports:
      - '8097:80'
    volumes:
      - ./../:/var/www/html
    networks:
      - default
  phpmyadmin:
    image: phpmyadmin
    container_name: pb-phpmyadmin
    restart: always
    ports:
      - "8096:80"
    environment:
      - PMA_ARBITRARY=1
    networks:
      - default
networks:
  default: