Skip to content

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 ​

VariablePurpose
VITE_APP_NAMEApplication name. Written to the site name and meta tags when the database is seeded
APP_ENVlocal or production
APP_KEYEncryption key. Generated on the first start if not set
APP_DEBUGDetailed error output. false in production
APP_URLPlatform URL. Links in emails and OAuth callback URLs are built from it
FORCE_HTTPStrue — treat all requests as HTTPS requests. Works only with APP_ENV=production
VITE_APP_LOCALELanguage (ru or en). Written to the platform language when the database is seeded
LOG_CHANNEL, LOG_LEVELLog channel and level

Database ​

VariablePurpose
DB_DATABASEDatabase name
DB_USERNAMEroot
DB_PASSWORDPassword of the root user in the MySQL container

Redis, cache, sessions and queues ​

VariableDefaultPurpose
CACHE_DRIVERredisCache store
SESSION_DRIVERredisSession store
SESSION_LIFETIME120Session lifetime in minutes
QUEUE_CONNECTIONredisQueue connection

WebSocket ​

The WebSocket server is Laravel Reverb.

VariablePurpose
BROADCAST_DRIVERreverb
REVERB_APP_ID, REVERB_APP_KEY, REVERB_APP_SECRETReverb application ID and keys
REVERB_HOST, REVERB_PORT, REVERB_SCHEMEAddress the application uses to reach Reverb
REVERB_APP_MAX_MESSAGE_SIZE, REVERB_MAX_REQUEST_SIZEMaximum message and request size in bytes
VITE_REVERB_APP_KEY, VITE_REVERB_HOST, VITE_REVERB_PORT, VITE_REVERB_SCHEMEBrowser connection parameters for Reverb
VariableDefaultPurpose
SCOUT_QUEUEtrueUpdate the search index in the background via the queue

Applying changes ​

What changedWhat to do
.envRecreate the container: docker compose up -d app, in production docker compose -f docker-compose.prod.yml up -d app
VITE_* in productionRebuild the images: docker compose -f docker-compose.prod.yml up -d --build

Released under the MIT License.