Configuration

All configuration is done via environment variables. Two .env files: one for Docker Compose (root), one for Laravel (backend).

Tip

Run npx stacktura init to generate both .env files interactively. You can always edit them manually afterwards.

Root .env (Docker Compose)

Controls Docker service ports and database credentials.

VariableDefaultDescription
DB_DATABASEstackturaPostgreSQL database
DB_USERNAMEstackturaPostgreSQL user
DB_PASSWORDsecretPostgreSQL password
FRONTEND_PORT3000Frontend port
BACKEND_PORT8000Backend port
POSTGRES_PORT5432PostgreSQL port
REDIS_PORT6379Redis port
MAILPIT_UI_PORT8025Mailpit web UI

Backend .env (Laravel)

API keys, secrets, and module toggles. Only the key variables are listed — Laravel's standard variables (APP_KEY, DB_*, etc.) work as documented.

VariableDescription
STRIPE_KEYStripe publishable key
STRIPE_SECRETStripe secret key
STRIPE_WEBHOOK_SECRETWebhook signing secret
STRIPE_PRICE_*Stripe price IDs (4 variables)
GOOGLE_CLIENT_IDGoogle OAuth client ID
GOOGLE_CLIENT_SECRETGoogle OAuth client secret
MODULE_BILLINGEnable/disable Billing module
MODULE_ADMINEnable/disable Admin module

Production

Never commit .env files to git. Both files are already in .gitignore. Use .env.example as a template.

Development Deployment

Documentation

Ready to build your SaaS?

Full source code, all modules, lifetime updates.

Get Stacktura — $249