# Yerel test: TYPO3 + MySQL. Önce: docker build -t typo3v13-app .
# Sonra: docker compose up -d  (veya docker-compose up -d)

services:
  app:
    image: typo3v13-app
    build: .
    ports:
      - "8080:80"
    environment:
      TYPO3_DB_HOST: db
      TYPO3_DB_PORT: "3306"
      TYPO3_DB_NAME: typo3
      TYPO3_DB_USER: typo3
      TYPO3_DB_PASSWORD: typo3
      TYPO3_DISPLAY_ERRORS: "1"
    depends_on:
      db:
        condition: service_healthy

  db:
    image: mariadb:11
    environment:
      MARIADB_DATABASE: typo3
      MARIADB_USER: typo3
      MARIADB_PASSWORD: typo3
      MARIADB_ROOT_PASSWORD: root
    volumes:
      - typo3_db_data:/var/lib/mysql
    healthcheck:
      test: ["CMD", "healthcheck.sh", "--connect", "--innodb_initialized"]
      interval: 5s
      timeout: 5s
      retries: 10

volumes:
  typo3_db_data:
