Laravel
Laravel is a web application framework with expressive, elegant syntax. We believe development must be an enjoyable and creative experience to be truly fulfilling.
Example repository here.
Requirements
- Set
Build Pack
tonixpacks
- Set the required environment variables
- Add
nixpacks.toml
with the following configuration - Set
Ports Exposes
to80
Environment Variables
If your application needs a database or Redis, you can simply create them beforehand in the Coolify dashboard.
You will receive the connection strings which you can use in your application and set them as environment variables:
All-in-one container
If you would like to start queue worker, scheduler, etc within one container (recommended), then you can place a nixpacks.toml
inside your repository with the following value.
With Inertia.js
When using Laravel with Inertia.js, you may need to specify some additional configuration in your nixpacks.toml
file.
Increasing the NGINX buffer size for Inertia requests
Because of a known issue with Inertia.js and default NGINX configuration, you may need to increase the buffer size for NGINX to handle Inertia requests.
Inertia SSR
If you are using Inertia.js with server-side rendering, you should add another worker in your nixpacks.toml
file to automatically start your SSR server.