Files
D1041231009-WebGIS-PovertyMap/DOCKER.md
T

1.5 KiB

Docker Development

This setup runs the Laravel app, Vite, and MySQL through Docker Compose.

Services

  • Laravel app: http://localhost:8000
  • Vite dev server: http://localhost:5173
  • MySQL from host: 127.0.0.1:3307
  • MySQL from containers: mysql:3306

First Run

If you want Docker to own the Laravel environment values, copy the Docker example:

Copy-Item .env.docker.example .env

Then start everything:

docker compose up -d --build

The app container installs Composer dependencies, generates APP_KEY if needed, clears config, runs migrations, and seeds the database (roles + default admin account).

The Vite container installs Node dependencies and starts the dev server.

Useful Commands

docker compose ps
docker compose logs -f app
docker compose logs -f vite
docker compose exec app php artisan migrate:status
docker compose exec app php artisan test
docker compose down

To remove the MySQL data volume and start with a clean database:

docker compose down -v

Database Credentials

Database: webgis_miskin
Username: webgis
Password: secret
Root password: root

Default Login

After first run, akses http://localhost:8000 dan login dengan:

Email: admin@webgis.local
Password: admin123

Roles yang Tersedia

Role Akses
administrator Akses penuh
pengurus_ibadah Kelola data rumah ibadah
petugas_pendataan Input/edit data keluarga miskin
pemangku_kebijakan View only