Files
D1041231009-WebGIS-PovertyMap/DOCKER.md
T
2026-06-02 19:55:25 +07:00

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

Akses http://localhost:8000 dan login dengan salah satu akun berikut:

Email Password Role
admin@webgis.local admin123 Administrator (akses penuh)
pengurus@webgis.local password123 Pengurus Ibadah
petugas@webgis.local password123 Petugas Pendataan
kebijakan@webgis.local password123 Pemangku Kebijakan (view only)