A Laravel 12 application with Livewire and Flux UI featuring a blog system with posts and categories management.
- Admin panel for managing blog posts and categories
- Many-to-many relationship between posts and categories
- Rich text content support
- Draft and published post statuses
- Public blog frontend with category filtering
- User authentication (admin only, registration disabled)
- Laravel 12 - PHP framework
- Livewire 3 - Full-stack framework for Laravel
- Flux UI (Free) - Component library for Livewire
- Tailwind CSS v4 - Utility-first CSS framework
- MariaDB - Database
- Fortify - Authentication backend
- PHP 8.4+
- Composer
- Node.js & NPM
- MariaDB
- Clone the repository
git clone git@github.com:TurkHosting/coolify-demo-app.git
cd coolify-demo-app- Install dependencies
composer install
npm install- Configure environment
cp .env.example .env
php artisan key:generate- Update
.envwith your database credentials:
DB_CONNECTION=mariadb
DB_HOST=127.0.0.1
DB_PORT=3306
DB_DATABASE=coolify_demo_app
DB_USERNAME=root
DB_PASSWORD=- Run migrations and seed database
php artisan migrate --seed- Build frontend assets
npm run build
# or for development
npm run dev- Start the development server
php artisan serve- Email: admin@example.com
- Password: password
This application is configured to deploy on Coolify using Nixpacks.
- Log in to your Coolify instance
- Go to Projects > New Resource > Application
- Select Public Repository or connect your Git provider
- Enter your repository URL:
git@github.com:TurkHosting/coolify-demo-app.git - Select the branch to deploy (e.g.,
main)
- Build Pack: Select
nixpacks - Port Exposes: Set to
80 - The
nixpacks.tomlfile in the repository root will be automatically detected
Add the following environment variables in Coolify:
# Application
APP_NAME="Laravel Blog Demo"
APP_ENV=production
APP_KEY=base64:your-app-key-here
APP_DEBUG=false
APP_URL=https://your-domain.com
# Database
DB_CONNECTION=mariadb
DB_HOST=your-database-host
DB_PORT=3306
DB_DATABASE=your_database_name
DB_USERNAME=your_database_user
DB_PASSWORD=your_database_password
# Session & Cache
SESSION_DRIVER=database
CACHE_STORE=database
QUEUE_CONNECTION=database# Mail (if needed)
MAIL_MAILER=smtp
MAIL_HOST=your-mail-host
MAIL_PORT=587
MAIL_USERNAME=your-mail-username
MAIL_PASSWORD=your-mail-password
MAIL_ENCRYPTION=tls
MAIL_FROM_ADDRESS=noreply@your-domain.com
MAIL_FROM_NAME="${APP_NAME}"
# Redis (optional, for better performance)
REDIS_HOST=your-redis-host
REDIS_PASSWORD=null
REDIS_PORT=6379- In your project, click New Resource > Database
- Select MariaDB
- Configure and deploy the database
- Copy the connection details to your environment variables
Use an external MariaDB/MySQL database and configure the connection details in environment variables.
- Click Deploy in Coolify
- Wait for the build to complete
- Once deployed, run migrations:
- Go to your application in Coolify
- Click Terminal or use the Commands section
- Run:
php artisan migrate --force --seed
Visit your configured domain or the Coolify-provided URL. Log in with the default admin credentials:
- Email: admin@example.com
- Password: password
Important: Change the default password immediately after first login!
To run migrations after deployment:
php artisan migrate --forceTo seed the database (only needed on first deployment):
php artisan migrate:fresh --seed --forceIf you need to clear application cache:
php artisan optimize:clearThe nixpacks.toml file includes:
- Nginx: Web server configuration
- PHP-FPM: PHP process manager
- Supervisor: Process management
- Queue Workers: 2 Laravel queue worker processes (configurable)
- Upload Limits: 30MB max file size, 35MB max post size
To adjust the number of queue worker processes, edit nixpacks.toml:
[staticAssets]
"worker-laravel.conf" = '''
...
numprocs=2 # Change this number
...
'''/- Homepage with hero and recent posts/blog- Blog index with all published posts/blog/{slug}- Individual post view/category/{slug}- Posts filtered by category/admin/posts- Admin: Manage posts/admin/categories- Admin: Manage categories/admin/posts/create- Admin: Create new post/admin/posts/{post}/edit- Admin: Edit post
Access the admin panel at /admin/posts after logging in. Features include:
- Create, edit, and delete blog posts
- Manage categories
- Set publish dates or save as drafts
- Assign multiple categories to posts
- Search and filter functionality
- Check that all environment variables are correctly set
- Verify database connection details
- Ensure
APP_KEYis generated and set
- Verify database credentials in environment variables
- Check that the database service is running
- Ensure network connectivity between app and database
- Run
npm run buildlocally and commit the compiled assets - Check that
APP_URLmatches your domain
If you encounter storage permission errors:
php artisan storage:linkFor issues related to:
- Coolify: Visit Coolify Documentation
- Laravel: Visit Laravel Documentation
- This Application: Open an issue in the repository
This is a demo application. Modify and use as needed for your projects.