services:
  app:
    build:
      context: .
      dockerfile: Dockerfile
    env_file:
      - .env
    environment:
      APP_ENV: production
      APP_DEBUG: "false"
      LOG_CHANNEL: stderr
      CACHE_DRIVER: file
      QUEUE_CONNECTION: sync
      SESSION_DRIVER: file
    volumes:
      - ./:/var/www/html
      - storage-data:/var/www/html/storage
      - cache-data:/var/www/html/bootstrap/cache

  web:
    image: nginx:1.25-alpine
    ports:
      - "80:80"
    volumes:
      - ./:/var/www/html:ro
      - storage-data:/var/www/html/storage
      - ./docker/nginx/app.conf:/etc/nginx/conf.d/default.conf:ro
    depends_on:
      - app

volumes:
  storage-data:
  cache-data:
