Configuration
The JournalPHP environment is configured in the .env file: platform URL, database, Redis and the WebSocket server.
Overview
Everything related to how the platform works — sign-in methods, email, file storage, search, AI, payments — is configured in the admin panel.
Application
| Variable | Purpose |
|---|---|
VITE_APP_NAME | Application name. Written to the site name and meta tags when the database is seeded |
APP_ENV | local or production |
APP_KEY | Encryption key. Generated on the first start if not set |
APP_DEBUG | Detailed error output. false in production |
APP_URL | Platform URL. Links in emails and OAuth callback URLs are built from it |
FORCE_HTTPS | true — treat all requests as HTTPS requests. Works only with APP_ENV=production |
VITE_APP_LOCALE | Language (ru or en). Written to the platform language when the database is seeded |
LOG_CHANNEL, LOG_LEVEL | Log channel and level |
Database
| Variable | Purpose |
|---|---|
DB_DATABASE | Database name |
DB_USERNAME | root |
DB_PASSWORD | Password of the root user in the MySQL container |
Redis, cache, sessions and queues
| Variable | Default | Purpose |
|---|---|---|
CACHE_DRIVER | redis | Cache store |
SESSION_DRIVER | redis | Session store |
SESSION_LIFETIME | 120 | Session lifetime in minutes |
QUEUE_CONNECTION | redis | Queue connection |
WebSocket
The WebSocket server is Laravel Reverb.
| Variable | Purpose |
|---|---|
BROADCAST_DRIVER | reverb |
REVERB_APP_ID, REVERB_APP_KEY, REVERB_APP_SECRET | Reverb application ID and keys |
REVERB_HOST, REVERB_PORT, REVERB_SCHEME | Address the application uses to reach Reverb |
REVERB_APP_MAX_MESSAGE_SIZE, REVERB_MAX_REQUEST_SIZE | Maximum message and request size in bytes |
VITE_REVERB_APP_KEY, VITE_REVERB_HOST, VITE_REVERB_PORT, VITE_REVERB_SCHEME | Browser connection parameters for Reverb |
Search
| Variable | Default | Purpose |
|---|---|---|
SCOUT_QUEUE | true | Update the search index in the background via the queue |
Applying changes
| What changed | What to do |
|---|---|
.env | Recreate the container: docker compose up -d app, in production docker compose -f docker-compose.prod.yml up -d app |
VITE_* in production | Rebuild the images: docker compose -f docker-compose.prod.yml up -d --build |