Guias
AgrSis - Test Instructions
AgrSis - Test Instructions
System Status ✅
All Docker containers are running properly:
- API: http://localhost:8000
- Producer Frontend: http://localhost:3003
- Supplier Frontend: http://localhost:3004
- pgAdmin: http://localhost:8080
- Mailhog: http://localhost:8025
Test Users Created
Producer Account
- Email: produtor@teste.com
- Password: password
- URL: http://localhost:3003/login
Supplier Account
- Email: fornecedor@teste.com
- Password: password
- URL: http://localhost:3004/login
All Users Updated
All 57 users in the database now have the password: password
Quick Test Commands
Test Producer Login via API:
curl -X POST http://localhost:8000/api/v1/login \
-H "Content-Type: application/json" \
-d '{"email":"produtor@teste.com","password":"password","user_type":"produtor"}'
Test Supplier Login via API:
curl -X POST http://localhost:8000/api/v1/login \
-H "Content-Type: application/json" \
-d '{"email":"fornecedor@teste.com","password":"password","user_type":"fornecedor"}'
Docker Container Commands
View running containers:
docker ps | grep agrsis
View API logs:
docker logs agrsis_api --tail=50
Execute commands in API container:
docker exec agrsis_api php artisan tinker
Important Notes
- All services are running in Docker containers
- Database is PostgreSQL on port 5433 (internal 5432)
- API is using the correct Docker database
- Frontend applications are configured to connect to the API at http://localhost:8000
Troubleshooting
If login fails:
- Check if containers are running:
docker ps - Restart API container:
docker restart agrsis_api - Check API logs:
docker logs agrsis_api --tail=100 - Verify database connection:
docker exec agrsis_api php artisan tinker --execute="DB::connection()->getPdo()"