Rakcha’s web application is built on Symfony and uses a .env file to configure all runtime settings. Copy the example file to get started:
cd apps/web
cp .env.example .env
Edit .env with your actual values before starting the application. Local overrides can be placed in .env.local, which is never committed to version control.
Never commit real credentials to version control. The .env file is listed in .gitignore. Use .env.local for local secrets and Symfony Secrets or your platform’s secret manager for production values.
Application settings
| Variable | Default | Description |
|---|
APP_ENV | prod | Runtime environment. Set to dev for local development or test for the test suite. |
APP_SECRET | (example value) | Symfony’s CSRF and cookie signing secret. Must be a long, random string unique to each environment. |
Replace APP_SECRET with a freshly generated random value in every environment. Never reuse the example value in production.
Database
| Variable | Default | Description |
|---|
DATABASE_URL | mysql://[email protected]:3306/rakcha?serverVersion=8.0.32&charset=utf8mb4 | Doctrine DBAL connection string. Encodes the driver, credentials, host, port, database name, and server version. |
Alternative formats supported by Doctrine:
# SQLite (local development only)
DATABASE_URL="sqlite:///%kernel.project_dir%/var/data_dev.db"
# MySQL 8
DATABASE_URL="mysql://[email protected]:3306/rakcha?serverVersion=8.0.32&charset=utf8mb4"
# MariaDB
DATABASE_URL="mysql://app:[email protected]:3306/app?serverVersion=10.11.2-MariaDB&charset=utf8mb4"
# PostgreSQL
DATABASE_URL="postgresql://app:[email protected]:5432/app?serverVersion=16&charset=utf8"
After updating the connection string, run migrations:
task web:migrate
# or directly:
php bin/console doctrine:migrations:migrate --no-interaction
Mailer
| Variable | Default | Description |
|---|
MAILER_DSN | null://null | Symfony Mailer transport DSN. The default null://null discards all emails (useful for development). |
Common alternatives:
# Discard all emails
MAILER_DSN=null://null
# Gmail (development only — not suitable for production)
# MAILER_DSN=gmail://USERNAME:PASSWORD@default
# SMTP relay
# MAILER_DSN=smtp://user:[email protected]:587
The compose.override.yaml file starts a Mailpit container on ports 1025 (SMTP) and 8025 (web UI) for local development. Set MAILER_DSN=smtp://localhost:1025 to use it.
Messenger
| Variable | Default | Description |
|---|
MESSENGER_TRANSPORT_DSN | doctrine://default?auto_setup=0 | Symfony Messenger transport for async message handling. The default uses the Doctrine database transport. |
Alternative transports:
# Doctrine (database-backed queue)
MESSENGER_TRANSPORT_DSN=doctrine://default?auto_setup=0
# RabbitMQ
# MESSENGER_TRANSPORT_DSN=amqp://guest:guest@localhost:5672/%2f/messages
# Redis
# MESSENGER_TRANSPORT_DSN=redis://localhost:6379/messages
OAuth providers
Rakcha uses HWIOAuthBundle to support social login. Each provider requires a client ID and secret obtained from the respective developer console.
| Variable | Description |
|---|
MICROSOFT_LIVE_ID | Microsoft Live OAuth application client ID. |
MICROSOFT_LIVE_SECRET | Microsoft Live OAuth application client secret. |
GOOGLE_ID | Google OAuth application client ID (used by HWIOAuthBundle for social login). |
GOOGLE_SECRET | Google OAuth application client secret (used by HWIOAuthBundle for social login). |
GITHUB_ID | GitHub OAuth application client ID. |
GITHUB_SECRET | GitHub OAuth application client secret. |
LINKEDIN_ID | LinkedIn OAuth application client ID. |
LINKEDIN_SECRET | LinkedIn OAuth application client secret. |
FACEBOOK_ID | Facebook OAuth application client ID. |
FACEBOOK_SECRET | Facebook OAuth application client secret. |
OAuth client secrets grant access to your application’s identity with each provider. Store them using Symfony Secrets or your hosting platform’s secrets manager — never in committed files.
Google API client
Used for Google API integrations beyond OAuth (e.g., YouTube Data API, Google Maps).
| Variable | Description |
|---|
GOOGLE_API_KEY | Server-side API key for Google APIs that do not require user authorization. |
GOOGLE_CLIENT_ID | OAuth 2.0 client ID for the Google API client library. |
GOOGLE_CLIENT_SECRET | OAuth 2.0 client secret for the Google API client library. |
GOOGLE_AUTH_CONFIG | Absolute path to a service account JSON credentials file. Defaults to %kernel.project_dir%/path/to/file.json. |
Payment processing
Stripe
| Variable | Description |
|---|
STRIPE_KEY | Stripe publishable key (safe to expose in the browser). |
STRIPE_SECRET_KEY | Stripe secret key used for server-side API calls. |
STRIPE_SECRET_KEY must never be exposed publicly. It grants full access to your Stripe account.
PayPal
| Variable | Default | Description |
|---|
PAYPAL_CLIENT_ID | (empty) | PayPal REST API application client ID. |
PAYPAL_SECRET_KEY | (empty) | PayPal REST API application secret. |
PAYPAL_CURRENCY | USD | Default currency for PayPal transactions (e.g., USD, EUR, TND). |
External APIs
| Variable | Description |
|---|
YOUTUBE_API_KEY | YouTube Data API v3 key for fetching video metadata and trailers. |
Search
Rakcha uses Meilisearch for full-text search.
| Variable | Default | Description |
|---|
MEILISEARCH_URL | http://127.0.0.1:7700 | URL of the Meilisearch instance. When running via Docker Compose, set this to http://meilisearch:7700. |
MEILISEARCH_API_KEY | (empty) | Meilisearch API key for authenticated requests. Required in production. |
MEILISEARCH_PREFIX | app_${APP_ENV}_ | Index name prefix, scoped by environment to avoid collisions. |
Locking
| Variable | Default | Description |
|---|
LOCK_DSN | flock | Symfony Lock store DSN. flock uses the local filesystem. For multi-server deployments, use a shared store such as Redis (redis://localhost:6379) or PostgreSQL advisory locks. |
Environment file loading order
Symfony loads .env files in the following order, with later files taking precedence:
.env — committed defaults
.env.local — uncommitted local overrides
.env.$APP_ENV — committed environment-specific defaults (e.g., .env.test)
.env.$APP_ENV.local — uncommitted environment-specific overrides
Real environment variables (set in the shell or container) always take precedence over .env files.
For production, compile all .env files into a single optimized PHP file by running composer dump-env prod. This avoids file I/O on every request.