Bootstrap simple laravel/livewire application, consisting of:
- Tabler.IO Basic Admin panel
- Simple Authentication
- PostgreSQL database with some redis for session storage/caching
- Basic Authorization System using Spatie
- Translations
-
Clone the repository on your file system. E.g:
/my/project/dir -
Run:
docker-compose up -dIf using on windows make sure the start script located in nginx-php/scripts/start.sh have an LF file endings before running the docker-compose up command
- Install dependencies
cd /my/project/dir
docker-compose exec -i nginx-php bash -c "composer install"
docker-compose exec -i nginx-php bash -c "artisan key:generate"- Run the initial migrations
docker-compose exec -i nginx-php bash -c "php artisan migrate"- Install Vite and build css/js assets. Best option is to have node/npm on your host system and do this outside of the container.
cd /my/project/dir/src
npm install
vite buildThere are few seeders we need to run in order to have some initial data setup.
The application roles are located at: src\app\Models\Enums\Roles.php.
The application permissions are located at: src\app\Models\Enums\Permissions.php.
Currently the permissions are not attached to any role, since this is a starter template.
When adding/removing new role or permission, modify the above enums respectively and run the seeder.
docker-compose exec -i nginx-php bash -c "php artisan db:seed --class=RoleSeeder"Create initial admin user
docker-compose exec -i nginx-php bash -c "php artisan db:seed --class=AdminUserSeeder"docker-compose exec -i nginx-php bash -c "php artisan db:seed --class=UserSeeder"You can view the project from http://localhost:5500 or https://localhost:5543.
To change the ports edit docker-compose file.
Your postgreSQL is available at 127.0.0.1:54320.
To regenerate the certificates run:
openssl req -x509 -nodes -days 3650 -newkey rsa:2048 -keyout cert/mycert.key -out cert/mycert.crt