-
-
Notifications
You must be signed in to change notification settings - Fork 3
Expand file tree
/
Copy path.env.example
More file actions
56 lines (44 loc) · 3.6 KB
/
.env.example
File metadata and controls
56 lines (44 loc) · 3.6 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
# ==============================================================================
# RAILWAY ENV EXAMPLE - For Railway deployment
# ==============================================================================
# Railway automatically detects variables from .env.example
# Variables with ${{...}} syntax are auto-filled by Railway
# Set other variables manually in Railway dashboard or template composer
# ==============================================================================
# Core Configuration
SECRET=${{secret(32)}} # Encryption key for securing your data. Railway automatically generates this for you.
PUBLIC_URL=https://${{RAILWAY_PUBLIC_DOMAIN}} # Your public Directus URL. This is where you'll access the admin panel. Automatically set when HTTP proxy is enabled on the service.
PORT=8055 # Port that Directus runs on. Must match Railway's HTTP Proxy port configuration (default 8055).
# Database Configuration (Auto-configured when PostgreSQL service is added)
DB_CLIENT=pg # Database type (PostgreSQL). This is pre-configured.
DB_CONNECTION_STRING=${{Postgres.DATABASE_URL}} # Database connection. Automatically configured when you add PostgreSQL service.
# Cache Configuration (Auto-configured when Redis service is added)
CACHE_STORE=redis # Cache storage type. Pre-configured for Redis.
CACHE_ENABLED=true # Enable caching to speed up your Directus instance.
CACHE_AUTO_PURGE=true # Automatically clear cache when content changes.
SYNCHRONIZATION_STORE=redis # Required for running multiple Directus instances together.
REDIS=${{Redis.REDIS_URL}} # Redis connection for caching. Automatically configured when you add Redis service.
# Storage Configuration (S3-compatible Railway bucket)
STORAGE_LOCATIONS=s3 # Use cloud storage for files. Set to 's3' for Railway's storage service.
STORAGE_S3_DRIVER=s3 # Storage driver type. Set to 's3' for S3-compatible storage.
STORAGE_S3_KEY=${{Bucket.ACCESS_KEY_ID}} # Storage access key. Automatically provided by Railway.
STORAGE_S3_SECRET=${{Bucket.SECRET_ACCESS_KEY}} # Storage secret key. Automatically provided by Railway.
STORAGE_S3_BUCKET=${{Bucket.BUCKET}} # Storage bucket name. Automatically created by Railway.
STORAGE_S3_REGION=${{Bucket.REGION}} # Storage region. Automatically configured by Railway.
STORAGE_S3_ENDPOINT=${{Bucket.ENDPOINT}} # Storage endpoint URL. Railway provides full URL (e.g., https://b1.us-west-1.storage.railway.app) - Directus will extract hostname automatically.
STORAGE_S3_FORCE_PATH_STYLE=true # Required for Railway's S3-compatible storage. Forces path-style URLs instead of virtual-hosted-style.
# Extensions Configuration
EXTENSIONS_LOCATION=s3 # Store Directus extensions in S3 bucket for persistence across deployments.
# Admin User Configuration (REQUIRED for CMS template)
ADMIN_EMAIL= example@email.com # REQUIRED for CMS template: Your admin account email address. Used to create admin user and apply CMS template automatically.
ADMIN_PASSWORD=${{secret()}} # REQUIRED for CMS template: Your admin account password. Railway can generate a secure password, or you can set your own. Change this after first login.
# CMS Template Configuration
DIRECTUS_TEMPLATE=cms # Automatically load pre-configured content collections (pages, articles, categories) on first deployment.
# WebSocket & Real-time Features
WEBSOCKETS_ENABLED=true # Enable real-time features like live updates and notifications.
# Logging
LOG_STYLE=raw # Format logs for easy reading in Railway's dashboard.
# CORS Configuration
CORS_ENABLED=true # Enable Cross-Origin Resource Sharing.
CORS_ORIGIN=* # Allow requests from any origin. Change to specific domains in production.
# Extensions Configuration