version: "3.8"

services:
  nginx:
    image: nginx:1.25-alpine
    container_name: nginx-learn
    restart: unless-stopped
    ports:
      - "8080:80"
    volumes:
      - ./html:/usr/share/nginx/html:ro
      - ./conf/default.conf:/etc/nginx/conf.d/default.conf:ro
      - ./logs:/var/log/nginx
    healthcheck:
      test: ["CMD", "wget", "-q", "-O", "-", "http://localhost/"]
      interval: 30s
      timeout: 5s
      retries: 3
