version: '3.8' services: nginx: image: nginx:1.28.2 container_name: nginx restart: always ports: - "80:80" volumes: - ./nginx.conf:/etc/nginx/nginx.conf - ./conf.d:/etc/nginx/conf.d healthcheck: test: ["CMD", "curl", "-f", "http://localhost/"] interval: 30s timeout: 10s retries: 3 start_period: 60s deploy: resources: limits: cpus: '1' memory: 1G reservations: cpus: '0.1' memory: 256M logging: driver: json-file options: max-size: 500m