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.
| Variable | Default | Description |
|---|---|---|
| DB_DATABASE | stacktura | PostgreSQL database |
| DB_USERNAME | stacktura | PostgreSQL user |
| DB_PASSWORD | secret | PostgreSQL password |
| FRONTEND_PORT | 3000 | Frontend port |
| BACKEND_PORT | 8000 | Backend port |
| POSTGRES_PORT | 5432 | PostgreSQL port |
| REDIS_PORT | 6379 | Redis port |
| MAILPIT_UI_PORT | 8025 | Mailpit 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.
| Variable | Description |
|---|---|
| STRIPE_KEY | Stripe publishable key |
| STRIPE_SECRET | Stripe secret key |
| STRIPE_WEBHOOK_SECRET | Webhook signing secret |
| STRIPE_PRICE_* | Stripe price IDs (4 variables) |
| GOOGLE_CLIENT_ID | Google OAuth client ID |
| GOOGLE_CLIENT_SECRET | Google OAuth client secret |
| MODULE_BILLING | Enable/disable Billing module |
| MODULE_ADMIN | Enable/disable Admin module |
Production
Never commit .env files to git. Both files are already in .gitignore. Use .env.example as a template.