version: '3.8'

services:
  nginx:
    image: nginx:latest
    container_name: nginx
    volumes:
      - /home/디렉토리/nginx.conf:/etc/nginx/nginx.conf
    ports:
      - 80:80
    healthcheck:
      test: ["CMD", "curl", "-f", "http://192.168.0.233:8080"]
      interval: 30s
      retries: 5

  tomcat1:
    image: tomcat:latest
    container_name: tomcat1
    volumes:
      - /home/디렉토리/tomcat1:/usr/local/tomcat
    ports:
      - 8080:8080

  tomcat2:
    image: tomcat:latest
    container_name: tomcat2
    volumes:
      - /home/디렉토리/tomcat2:/usr/local/tomcat
    ports:
      - 8081:8080
