version: "3.7"
services:
  app:
    image: registry.danova.id/new-pmb-development/pmb-ummat/apppmb:0.4.0
    volumes:
      - appvolume:/var/www
    networks:
      - pmbummat

  db:
    image: registry.danova.id/new-pmb-development/pmb-ummat/dbpmb:0.0.2
    container_name: dbpmb
    restart: unless-stopped
    ports:
      - 3306:3306
    volumes:
      - databasevol:/docker-entrypoint-initdb.d
      - datasave:/var/lib/mysql
    networks:
      - pmbummat

  nginx:
    image: registry.danova.id/new-pmb-development/pmb-ummat/nginxpmb:0.2.2
    working_dir: /var/www
    container_name: nginxpmb
    # user: "1000:1000"
    restart: unless-stopped
    ports:
      - 80:80
    volumes:
      - appvolume:/var/www
    networks:
      - pmbummat

networks:
  pmbummat:
    driver: bridge

volumes:
  databasevol:
  datasave:
  appvolume:
  webvolume:
    #   driver_opts:
    #     type: none
    #     device: ${PWD}
    #     o: bind
    # databasevol:
    #   driver_opts:
    #     type: none
    #     device: ${PWD}/docker-compose/mysql
    #     o: bind
    # datasave:

    # storage/app/public/mahasiswa/gelombang20221/umum1/test123456789123456721/KTPtest21103SdHGVc3.jpg
