Skip to main content
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

VariableDefaultDescription
APP_ENVprodRuntime 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

VariableDefaultDescription
DATABASE_URLmysql://[email protected]:3306/rakcha?serverVersion=8.0.32&charset=utf8mb4Doctrine 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

VariableDefaultDescription
MAILER_DSNnull://nullSymfony 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

VariableDefaultDescription
MESSENGER_TRANSPORT_DSNdoctrine://default?auto_setup=0Symfony 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.
VariableDescription
MICROSOFT_LIVE_IDMicrosoft Live OAuth application client ID.
MICROSOFT_LIVE_SECRETMicrosoft Live OAuth application client secret.
GOOGLE_IDGoogle OAuth application client ID (used by HWIOAuthBundle for social login).
GOOGLE_SECRETGoogle OAuth application client secret (used by HWIOAuthBundle for social login).
GITHUB_IDGitHub OAuth application client ID.
GITHUB_SECRETGitHub OAuth application client secret.
LINKEDIN_IDLinkedIn OAuth application client ID.
LINKEDIN_SECRETLinkedIn OAuth application client secret.
FACEBOOK_IDFacebook OAuth application client ID.
FACEBOOK_SECRETFacebook 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).
VariableDescription
GOOGLE_API_KEYServer-side API key for Google APIs that do not require user authorization.
GOOGLE_CLIENT_IDOAuth 2.0 client ID for the Google API client library.
GOOGLE_CLIENT_SECRETOAuth 2.0 client secret for the Google API client library.
GOOGLE_AUTH_CONFIGAbsolute path to a service account JSON credentials file. Defaults to %kernel.project_dir%/path/to/file.json.

Payment processing

Stripe

VariableDescription
STRIPE_KEYStripe publishable key (safe to expose in the browser).
STRIPE_SECRET_KEYStripe 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

VariableDefaultDescription
PAYPAL_CLIENT_ID(empty)PayPal REST API application client ID.
PAYPAL_SECRET_KEY(empty)PayPal REST API application secret.
PAYPAL_CURRENCYUSDDefault currency for PayPal transactions (e.g., USD, EUR, TND).

External APIs

VariableDescription
YOUTUBE_API_KEYYouTube Data API v3 key for fetching video metadata and trailers.
Rakcha uses Meilisearch for full-text search.
VariableDefaultDescription
MEILISEARCH_URLhttp://127.0.0.1:7700URL 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_PREFIXapp_${APP_ENV}_Index name prefix, scoped by environment to avoid collisions.

Locking

VariableDefaultDescription
LOCK_DSNflockSymfony 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:
  1. .env — committed defaults
  2. .env.local — uncommitted local overrides
  3. .env.$APP_ENV — committed environment-specific defaults (e.g., .env.test)
  4. .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.

Build docs developers (and LLMs) love