services:
  minishell:

    container_name: "minishell"
    restart: always

    build:
      context: ./minishell
      dockerfile: Dockerfile

    cap_drop:
      - ALL
    cap_add:
      - SETGID
      - FSETID
      - SETUID

    devices:
      - /dev/kvm

    # Prevents gaining new privileges
    security_opt:
      - no-new-privileges

    networks:
      website_net:

  nginx-site:
    container_name: "nginx-site"
    image: nginx

    restart: always
    volumes:
      - ./nginx/nginx.conf:/etc/nginx/nginx.conf
      - ./nginx/certs:/certs
      - ./nginx/site:/var/www/html
      - novnc:/opt/noVNC/

    networks:
      website_net:


    ports:
      - 5080:80
      - 5443:443

  minirt:
    container_name: "minirt-site"
    restart: always
    build: ./miniRT

    environment:
      - DISPLAY=:1

    ports:
      - 6080:6080
      - 5901:5901

    networks:
      website_net:

    volumes:
      - novnc:/opt/noVNC/


volumes:
  novnc:

networks:
  website_net:
    external: true
    driver: bridge
