f518d7d184821fe378a3c57836c05c91fb6386e4
NRML Dashboard
Laravel-based dashboard application running with Docker, Nginx, MySQL, and phpMyAdmin.
Requirements
- Docker Desktop
- Docker Compose
- Git
Project Structure
nrml_dashboard/
├── dashboard/ # Laravel application
├── docker/
├── docker-compose.yml
├── Dockerfile
├── nginx.conf
First-Time Setup
Clone Repository
git clone https://gitea.niph.org.kh/khantey/nrml_dashboard.git
cd nrml_dashboard
Create Environment File
cd dashboard
cp .env.example .env
Start Docker Containers
docker compose up -d --build
Install PHP Dependencies
docker exec -it dashboard_app bash
cd /var/www
composer install
Generate Application Key
php artisan key:generate
Configure Database
Update .env:
DB_CONNECTION=mysql
DB_HOST=mysql
DB_PORT=3306
DB_DATABASE=dashboard
DB_USERNAME=laravel
DB_PASSWORD=secret
Run Migrations
php artisan migrate
Frontend Assets
Install dependencies:
cd dashboard
npm install
npm run build
Application URLs
Dashboard
phpMyAdmin
Credentials:
Server: mysql
Username: laravel
Password: secret
Storage Directories
The following Laravel directories are committed to Git using placeholder .gitignore files:
storage/framework/cache
storage/framework/sessions
storage/framework/testing
storage/framework/views
storage/logs
Do not remove these directories.
Common Commands
Enter application container:
docker exec -it dashboard_app bash
Clear Laravel caches:
php artisan optimize:clear
View logs:
php artisan pail
Stop containers:
docker compose down
Restart containers:
docker compose restart
Troubleshooting
"Please provide a valid cache path"
Verify that the following directories exist:
storage/framework/cache
storage/framework/sessions
storage/framework/testing
storage/framework/views
storage/logs
Then run:
php artisan optimize:clear
Permission Issues
Inside the container:
chown -R www-data:www-data storage bootstrap/cache
chmod -R 775 storage bootstrap/cache
Description
Languages
PHP
36.5%
Blade
34.8%
JavaScript
28.6%
Dockerfile
0.1%