services:
  database:
    image: mariadb:11.4
    environment:
      MARIADB_ROOT_PASSWORD: root
      MARIADB_DATABASE: tca-industries-dev
    ports:
      - "3311:3306"   # 3307 modifiable pour ne pas entrer en collision avec d'autres projets
    volumes:
      - db_data:/var/lib/mysql

  phpmyadmin:
    image: phpmyadmin:latest
    depends_on:
      - database
    environment:
      PMA_HOST: database
      PMA_PORT: 3306
      UPLOAD_LIMIT: 512M
    ports:
      - "8091:80" # interface web (localhost/phpmyadmin)

  mailpit:
    image: axllent/mailpit:latest
    ports:
      - "1030:1025"   # SMTP (réception des mails)
      - "8030:8025"   # interface web (consultation)
    environment:
      MP_SMTP_AUTH_ACCEPT_ANY: 1
      MP_SMTP_AUTH_ALLOW_INSECURE: 1

volumes:
  db_data:
