-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathenv.example
More file actions
86 lines (78 loc) · 4.48 KB
/
Copy pathenv.example
File metadata and controls
86 lines (78 loc) · 4.48 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
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
# =============================================================================
# Bitcoin District - Docker Compose Environment Variables
# =============================================================================
# Copy this file to .env and fill in your actual values
# See .cursor/rules/RULES.md for architectural guidelines
# -----------------------------------------------------------------------------
# Ansible Deployment Configuration
# -----------------------------------------------------------------------------
BD_WEB_HOST=your_production_server_ip_here
# -----------------------------------------------------------------------------
# PostgreSQL Database Configuration
# -----------------------------------------------------------------------------
POSTGRES_DB=directus
POSTGRES_USER=directus
POSTGRES_PASSWORD=your_secure_postgres_password_here
# -----------------------------------------------------------------------------
# Directus CMS Configuration
# -----------------------------------------------------------------------------
DIRECTUS_KEY=your_random_key_here_min_32_chars
DIRECTUS_SECRET=your_random_secret_here_min_32_chars
DIRECTUS_ADMIN_EMAIL=admin@bitcoindistrict.org
DIRECTUS_ADMIN_PASSWORD=your_secure_admin_password_here
# -----------------------------------------------------------------------------
# Public Directus URL (CRITICAL for Hydration Trap Prevention)
# -----------------------------------------------------------------------------
# This is the URL that browsers will use to fetch data from Directus.
#
# DEVELOPMENT: Use http://localhost:8055
# PRODUCTION: Use https://api.bitcoindistrict.org (or your actual domain)
#
# WHY THIS MATTERS:
# - The Astro container uses http://directus:8055 (internal Docker network)
# - Browsers cannot resolve Docker service names like "directus"
# - This PUBLIC_DIRECTUS_URL is what gets sent to the browser for client-side fetches
# - See .cursor/rules/RULES.md section "The Hydration Trap" for details
# -----------------------------------------------------------------------------
PUBLIC_DIRECTUS_URL=http://localhost:8055
# -----------------------------------------------------------------------------
# Production Example (uncomment and modify for production deployment):
# -----------------------------------------------------------------------------
# PUBLIC_DIRECTUS_URL=https://api.bitcoindistrict.org
# -----------------------------------------------------------------------------
# CMS Enable/Disable Flag
# -----------------------------------------------------------------------------
# Set to "true" to enable CMS-backed features (events, podcasts, etc.)
# Set to "false" to disable CMS features (useful for maintenance or testing)
# Default: true
# -----------------------------------------------------------------------------
PUBLIC_CMS_ENABLED=true
# -----------------------------------------------------------------------------
# Directus Static Tokens (for server-side operations and imports)
# -----------------------------------------------------------------------------
# These tokens authenticate server-side operations like RSS imports.
# Generate tokens in Directus: Settings > Access Tokens > Create New Token
#
# DIRECTUS_STATIC_TOKEN: General-purpose token for SSR authentication
# DIRECTUS_EVENTS_TOKEN: Dedicated token for RSS event imports (recommended)
#
# SECURITY NOTES:
# - These tokens are NEVER exposed to the browser (only used server-side)
# - Create tokens with appropriate permissions (Admin or specific collections)
# - Keep these tokens secret and rotate periodically
# - For production, use separate tokens with minimal required permissions
# -----------------------------------------------------------------------------
DIRECTUS_STATIC_TOKEN=your_static_token_here_from_directus_settings
DIRECTUS_EVENTS_TOKEN=your_events_import_token_here_from_directus_settings
# -----------------------------------------------------------------------------
# How to Generate Static Tokens:
# -----------------------------------------------------------------------------
# 1. Log into Directus admin: http://localhost:8055
# 2. Navigate to: Settings > Access Tokens
# 3. Click "Create New Token"
# 4. Name it (e.g., "SSR Token" or "Event Import Token")
# 5. Set permissions:
# - For DIRECTUS_STATIC_TOKEN: Admin or Read access to all collections
# - For DIRECTUS_EVENTS_TOKEN: Create/Update on Events, Venues, tags, directus_files
# 6. Copy the generated token and paste it here
# -----------------------------------------------------------------------------