version: '3.7'

services:
  database:
    image: mariadb
    container_name: tb-con-mariadb
    ports:
      - "3399:3306"
    environment:
      # think about .env file here
      MYSQL_ROOT_PASSWORD: root
    volumes:
      - ./../.db:/var/lib/mysql
    restart: always
    networks:
      - default
  tbuddy:
    build:
      context: ./
      dockerfile: Dockerfile
    image: 'tb_spt_image'
    container_name: tb-con-tbuddy
    ports:
      - '8099:80'
    volumes:
      - ./../:/var/www/html
    networks:
      - default
  phpmyadmin:
    image: phpmyadmin
    container_name: tb-con-phpmyadmin
    restart: always
    ports:
      - "8098:80"
    environment:
      - PMA_ARBITRARY=1
    networks:
      - default
networks:
  default: