services:
  app:
    build:
      context: ..
      dockerfile: docker/Dockerfile
    ports:
      - "8080:80"
    environment:
      APP_ENV: local
      APP_DEBUG: 1
      APP_URL: http://localhost:8080
      DB_HOST: db
      DB_PORT: 3306
      DB_NAME: infozone_forum
      DB_USER: infozone
      DB_PASS: infozone
      DB_CHARSET: utf8mb4
      SESSION_NAME: infozone_session
      CSRF_TOKEN_KEY: _csrf
    depends_on:
      - db
    volumes:
      - ../storage:/var/www/html/storage

  db:
    image: mariadb:10.11
    environment:
      MARIADB_DATABASE: infozone_forum
      MARIADB_USER: infozone
      MARIADB_PASSWORD: infozone
      MARIADB_ROOT_PASSWORD: root
    ports:
      - "3307:3306"
    volumes:
      - dbdata:/var/lib/mysql

volumes:
  dbdata:
