version: "3.7"
services:
  app:
    build:
      context: ./
      dockerfile: Dockerfile
    image: trucking
    container_name: trucking-app
    restart: unless-stopped
    working_dir: /var/www/html/trucking
    # comment volumes, kalo file/folder yg existing di container gamau ketiban
    volumes:
      - ./:/var/www/html/trucking
    networks:
      - trucking

  nginx:
    image: nginx:alpine
    container_name: trucking-nginx
    restart: unless-stopped
    ports:
      - "5000:80"
    volumes:
      - ./:/var/www/html/trucking
      - ./docker-data/nginx/default.conf:/etc/nginx/conf.d/default.conf
    networks:
      - trucking

networks:
  trucking:
    driver: bridge