Skip to main content

Setting Up

Microservice - PMB Schools

Installation

docker run \
  --name microservice-sekolah \
  -e OCTANE_SERVER=swoole\
  -e APP_KEY=base64:pQ5RRwUuTRaOdkESrBActaiTXB0qOpvVPxkb4u07GvY= \
  -e APP_DEBUG=false \
  -e DB_CONNECTION=mysql \
  -e DB_HOST=HOST_IP \
  -e DB_PORT=HOST_PORT \
  -e DB_DATABASE=DATABASE \
  -e DB_USERNAME=dbuser \
  -e DB_PASSWORD=dbpass \
  -p 8000:8000 \
  shadowbane/microservice-pmb-school:latest

Sesuaikan value dari DB_HOST, DB_PORT, DB_DATABASE, DB_USERNAME, dan DB_PASSWORD.

First Time Setup

Buka tab baru pada terminal. Jalankan docker exec -it microservice-sekolah bash. Kemudian, jalankan:

php artisan migrate:fresh --seed

Testing via browser

Buka browser, test akses ke: http://localhost:8000/api/v1/school.

Siakad Configuration

Silahkan buka https://siakad.test/setting?key=microservice&persistent-table=true

pastikan konfigurasi sesuai dengan pada gambar berikut: