version: "3.8"
services:
  backend:
    build:
      context: .
      dockerfile: backend/Dockerfile
    container_name: njts_backend
    restart: unless-stopped
    env_file:
      - .env
    ports:
      - "18080:18080"
    volumes:
      - ./frontend:/app/frontend:ro
    networks:
      - njts_net

  nginx:
    image: nginx:stable
    container_name: njts_nginx
    restart: unless-stopped
    ports:
      - "18000:80"
    volumes:
      - ./frontend:/usr/share/nginx/html:ro
      - ./docker/nginx/default.conf:/etc/nginx/conf.d/default.conf:ro
    depends_on:
      - backend
    networks:
      - njts_net

networks:
  njts_net:
    driver: bridge
