-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy path.env.dev.example
More file actions
156 lines (132 loc) · 5.19 KB
/
Copy path.env.dev.example
File metadata and controls
156 lines (132 loc) · 5.19 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
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
# Copyright (c) 2025 Affilibuster by Ronen Druker.
# Affilibuster Environment Configuration
# =======================================
#
# SETUP INSTRUCTIONS:
# -------------------
# 1. Copy this file: cp .env.dev.example .env
# 2. Customize values for your environment
# 3. For Docker: Use Docker networking hostnames (postgres, redis, strapi)
# 4. For Local Development: Use localhost for all services
#
# IMPORTANT SECURITY NOTES:
# -------------------------
# ⚠️ NEVER commit .env file to version control
# ⚠️ Change all secrets (JWT keys, API tokens) in production
# ⚠️ Use strong, randomly-generated values for all *_SECRET variables
# ⚠️ Generate secrets with: openssl rand -base64 32
#
# USAGE IN COMPONENTS:
# --------------------
# Loads from root .env via docker-compose.yaml
# ======================================
# SHARED INFRASTRUCTURE
# ======================================
# PostgreSQL and Redis configuration shared across all services
# PostgreSQL Database
# Single database used by both backend and CMS
POSTGRES_PROTOCOL=postgresql
POSTGRES_HOST=localhost
INTERNAL_POSTGRES_HOST=postgres
POSTGRES_PORT=5432
POSTGRES_USER=affilibuster
POSTGRES_PASSWORD=affilibuster
POSTGRES_DB=affilibuster_db
POSTGRES_SSL=false
POSTGRES_SSL_REJECT_UNAUTHORIZED=true
# Redis Cache & Session Store
REDIS_PROTOCOL=redis
REDIS_HOST=localhost
INTERNAL_REDIS_HOST=redis
REDIS_PORT=6379
REDIS_TTL_PREFERENCES=2592000 # 30 days in seconds (prefs: user language/currency)
# ======================================
# CMS (Strapi 5 - Node.js)
# ======================================
# NOTE: Copy these variables to cms/.env
#
# ARCHITECTURE: Strapi runs on HTTP internally; Nginx (strapi-proxy) handles HTTPS termination.
# - Strapi container: HTTP on port 1337 (internal only, not exposed to host)
# - Nginx proxy: HTTPS on port 1337 (exposed to host at https://localhost:1337)
# - Backend accesses Strapi via HTTPS through the Nginx proxy
# This is the recommended production pattern for Strapi deployments.
# Server Configuration
CMS_PROTOCOL=https # External protocol (through Nginx proxy)
CMS_PORT=1337
CMS_HOST=localhost
INTERNAL_CMS_HOST=strapi-proxy # Internal hostname for Nginx HTTPS proxy
# SSL Certificate Paths (for Nginx proxy and backend)
# Docker: Paths are relative to container mount point (/certs)
# Local: Use absolute paths or paths relative to service working directory
SSL_CERT_PATH=/certs/localhost.pem
SSL_KEY_PATH=/certs/localhost-key.pem
# CMS URLs for documentation (used by merge-openapi.ts)
CMS_URL_PROD=https://cms.thegreenbrother.com
CMS_URL_DEV=https://localhost:1337
# Cloudinary
CLOUDINARY_NAME=
CLOUDINARY_KEY=
CLOUDINARY_SECRET=
# Security Keys
ADMIN_JWT_SECRET=your-admin-jwt-secret-change-in-production
API_TOKEN_SALT=your-api-token-salt-change-in-production
API_TOKEN_ENCRYPTION_KEY=your-api-token-encryption-key-change-in-production
TRANSFER_TOKEN_SALT=your-transfer-token-salt-change-in-production
APP_KEYS=your-app-key-1,your-app-key-2,your-app-key-3,your-app-key-4
# Preview (Draft Mode)
# Shared secret between CMS and TheGreenBrother for content preview
PREVIEW_SECRET=your-preview-secret-change-in-production
# Frontend URL for preview redirect (CMS → TheGreenBrother)
CLIENT_URL=https://localhost:3000
# ======================================
# BACKEND (FastAPI - Python 3.13)
# ======================================
# Application Configuration
APP_ENV=development
DEBUG=true
LOG_LEVEL=DEBUG
# Server Configuration
BACKEND_PROTOCOL=https
BACKEND_PORT=8000
BACKEND_HOST=localhost
INTERNAL_BACKEND_HOST=backend
# Backend URLs for documentation (used by merge-openapi.ts)
BACKEND_URL_PROD=https://thegreenbrother.com/api/v1
BACKEND_URL_DEV=https://localhost:8000/v1
# Security
JWT_SECRET=your-secret-key-change-in-production
# Newsletter (Brevo)
BREVO_API_KEY=your-brevo-api-key
BREVO_LIST_ID=0
BREVO_DOI_TEMPLATE_ID=0
BREVO_DOI_REDIRECT_URL=https://localhost:3000?newsletter=confirmed
# ======================================
# THE_GREEN_BROTHER (Next.js 16 - TypeScript)
# ======================================
# Environment
NODE_ENV=development
NODE_EXTRA_CA_CERTS=/certs/rootCA.pem
NEXT_TELEMETRY_DISABLED=1
# TheGreenBrother Configuration
THE_GREEN_BROTHER_PROTOCOL=https
THE_GREEN_BROTHER_PORT=3000
THE_GREEN_BROTHER_HOST=localhost
INTERNAL_THE_GREEN_BROTHER_HOST=the-green-brother
# GentleHawk Configuration
GENTLE_HAWK_PROTOCOL=https
GENTLE_HAWK_PORT=3001
GENTLE_HAWK_HOST=localhost
NEXT_PUBLIC_API_URL=https://localhost:8000/v1 # Backend API URL, browser-accessible
NEXT_PUBLIC_CMS_URL=https://localhost:1337 # Strapi CMS URL, for client-side image URLs
# NEXT_PUBLIC_CMS_URL=https://rdrkr-mbp-m1.local:1337 # CMS URL, for client-side image URLs
NEXT_PUBLIC_SITE_URL=https://localhost:3000 # Public site URL, used for sitemap/robots/manifest
NEXT_PUBLIC_SITE_DESCRIPTION="Discover the best eco-friendly products for a sustainable lifestyle." # Base meta description for SEO
# Playwright E2E Testing
PLAYWRIGHT_REPORT_PORT=9323
# ======================================
# UPTIME KUMA (Monitoring)
# ======================================
UPTIME_KUMA_URL=http://localhost:3001
UPTIME_KUMA_USER=admin
UPTIME_KUMA_TELEGRAM_BOT_TOKEN=
UPTIME_KUMA_TELEGRAM_CHAT_ID=