Skip to main content

Quick start

In your Laravel application:

npm install @kirschbaum-development/sst-laravel --save
npx sst-laravel init
npm run build # the image copies vendor/ and public/build as they are
npx sst-laravel deploy --stage dev

init creates a minimal sst.config.ts: a VPC and one small web container that reads its environment from .env.<stage>. Before the first deploy, create .env.dev and trust the load balancer in your app. Getting Started walks through each step.

From there, add what your application needs:

const app = new LaravelService("MyLaravelApp", {
vpc,
link: [database, redis],
web: {
size: "medium",
domain: "app.example.com",
healthCheck: { path: "/up" },
scaling: { min: 1, max: 3 },
},
workers: [{ name: "horizon", horizon: true }],
reverb: { domain: "ws.example.com" },
config: {
environment: { file: `.env.${$app.stage}` },
},
});