services:
  posbuku-web:
    build:
      context: .
      dockerfile: Dockerfile
    container_name: posbuku-web
    restart: unless-stopped
    ports:
      - "8083:80"
    environment:
      APP_BASE_URL: "https://buku.smk-almuhtadin.com/"
      DB_HOST: "posbuku-db"
      DB_NAME: "db_posbuku"
      DB_USERNAME: "buku"
      DB_PASSWORD: "apaansikocak2121"
    depends_on:
      - posbuku-db
    volumes:
      - posbuku_uploads:/var/www/html/uploads

  posbuku-db:
    image: mariadb:10.5
    container_name: posbuku-db
    restart: unless-stopped
    environment:
      MYSQL_ROOT_PASSWORD: "GANTI_ROOT_PASSWORD_DATABASE_MIN"
      MYSQL_DATABASE: "db_posbuku_v3"
      MYSQL_USER: "posbuku_user"
      MYSQL_PASSWORD: "GANTI_PASSWORD_DATABASE_MIN"
    volumes:
      - posbuku_db_data:/var/lib/mysql

volumes:
  posbuku_db_data:
  posbuku_uploads: