-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy path.env.example
More file actions
179 lines (152 loc) · 7.38 KB
/
Copy path.env.example
File metadata and controls
179 lines (152 loc) · 7.38 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
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
# ============================================
# Zone01 Admin Dashboard - Environment Variables
# ============================================
# Copy this file to .env and fill in your values
# cp .env.example .env
# ============================================
# 🔐 STACK AUTH - Authentication
# ============================================
# Get these from: https://app.stack-auth.com
# 1. Create a new project
# 2. Go to Settings > API Keys
# 3. Copy the values below
NEXT_PUBLIC_STACK_PROJECT_ID=your_stack_project_id
NEXT_PUBLIC_STACK_PUBLISHABLE_CLIENT_KEY=your_publishable_client_key
STACK_SECRET_SERVER_KEY=your_secret_server_key
# ============================================
# 🗄️ DATABASE - PostgreSQL (VPS z01)
# ============================================
# Base Postgres interne du VPS (réseau Docker postgres-production-network).
# Source de connexion UNIQUE (runtime + drizzle-kit) : POSTGRES_URL.
# Prod : postgresql://dashboard:<pwd>@postgres-production:5432/admin_dashboard
# Local : pointer vers votre Postgres de dev.
POSTGRES_URL=postgresql://user:password@host:5432/admin_dashboard
# Postgres interne du VPS = sans TLS → "disable". Pour une base distante avec
# TLS (ou ?sslmode=require dans l'URL), laisser vide.
POSTGRES_SSL=disable
# ============================================
# 🌐 ZONE01 API - External API
# ============================================
# Contact Zone01 Normandie to get your API token
AUTHENDPOINT=https://hub.zone01normandie.org
# Serveur (cron scan-gitea) : token Zone01 côté serveur.
ACCESS_TOKEN=your_zone01_api_access_token
# ── Chantier A / Palier 2 : breakdown langages par repo.
# Fonctionne déjà avec ACCESS_TOKEN (l'API Gitea de l'org l'accepte) — rien
# à configurer. Ces 2 variables ne servent qu'à surcharger l'URL/token Gitea
# si besoin (ex. instance différente). Défaut URL : zone01normandie.org/git.
GITEA_API_URL=
GITEA_TOKEN=
# ── Chantier A / synthèse IA (opt-in, coût) : frameworks/domaines + narratif
# par-dessus les skills langages déterministes. Désactivée par défaut.
# Mettre à 1 pour l'activer sur le cron scan-gitea (ou appeler ?ai=1).
# Provider via l'AI SDK : utilise MISTRAL_API_KEY (déjà présent pour Nova).
SKILLS_AI_SYNTHESIS=
# ── Chantier C : recap hebdo des code-reviews sur Teams.
# URL d'un flux Power Automate « Publier sur un canal quand une requête
# webhook est reçue » (Teams > canal > … > Flux de travail). Le cron
# weekly-recap y poste une Adaptive Card. Vide = recap désactivé.
TEAMS_WEBHOOK_URL=
# ============================================
# 🔧 APPLICATION CONFIGURATION
# ============================================
# Base URL of your application
# Development: http://localhost:3000
# Production: https://hub.zone01normandie.org
NEXT_PUBLIC_BASE_URL=http://localhost:3000
# Secret for cron job authentication
# Generate with: openssl rand -base64 32
CRON_SECRET=your_cron_secret_here
# Discord bot token for DM notifications
# Get this from: https://discord.com/developers/applications > Bot > Token
DISCORD_BOT_TOKEN=your_discord_bot_token_here
# General authentication secret
# Generate with: openssl rand -base64 32
AUTH_SECRET=your_auth_secret_here
# ============================================
# 🔑 Qua SSO (Zone01)
# ============================================
# These are required for Authentik SSO login
# Get these from your Authentik admin panel
AUTHENTIK_CLIENT_ID=your_authentik_client_id
AUTHENTIK_CLIENT_SECRET=your_authentik_client_secret
AUTHENTIK_ISSUER=https://auth.zone01normandie.org/application/o/hub
# NextAuth secret for JWT encryption
# Generate with: openssl rand -base64 32
NEXTAUTH_SECRET=your_nextauth_secret_here
NEXTAUTH_URL=http://localhost:3000
# ============================================
# 🔑 OAUTH CREDENTIALS (Optional)
# ============================================
# These are only needed if you're using Stack Auth OAuth providers
# For Stack Auth, configure OAuth providers in Stack Dashboard
AUTH_GITHUB_ID=your_github_oauth_client_id
AUTH_GITHUB_SECRET=your_github_oauth_client_secret
AUTH_GOOGLE_ID=your_google_oauth_client_id
AUTH_GOOGLE_SECRET=your_google_oauth_client_secret
# ============================================
# 📅 GOOGLE CALENDAR - Slot tracking
# ============================================
# Setup: GCP Console → IAM → Service Accounts → create JSON key
# Share the calendar with the service account email (role: "See events")
GOOGLE_CALENDAR_ID=xxx@group.calendar.google.com
GOOGLE_SERVICE_ACCOUNT_EMAIL=xxx@xxx.iam.gserviceaccount.com
GOOGLE_SERVICE_ACCOUNT_PRIVATE_KEY="-----BEGIN RSA PRIVATE KEY-----\n...\n-----END RSA PRIVATE KEY-----"
# ============================================
# 📝 NOTES
# ============================================
#
# Security Tips:
# - NEVER commit .env file to version control
# - Keep your secrets secure and rotate them regularly
# - Use different values for development and production
# - Déploiement VPS z01 : ces variables vivent dans le .env du docker-compose
# sur le serveur (~/sites/hub.zone01normandie.org/).
#
# Required Variables (Minimum to run):
# ✅ NEXT_PUBLIC_STACK_PROJECT_ID
# ✅ NEXT_PUBLIC_STACK_PUBLISHABLE_CLIENT_KEY
# ✅ STACK_SECRET_SERVER_KEY
# ✅ POSTGRES_URL
#
# For Authentik SSO (optional):
# ✅ AUTHENTIK_CLIENT_ID
# ✅ AUTHENTIK_CLIENT_SECRET
# ✅ AUTHENTIK_ISSUER
# ✅ NEXTAUTH_SECRET (required in production)
#
# For more information, see:
# - docs/ENV_VARIABLES.md
# - README.md#configuration
# ─── Claude / Anthropic ────────────────────────────────────────────────
# Clé API pour générer les résumés d'audits manquants
# Obtenir sur : https://console.anthropic.com/settings/keys
ANTHROPIC_API_KEY=
# ─── Intégration Bot Discord (relances interactives) ───────────────────────────
# URL interne du web_server du bot (réseau Docker sur z01)
BOT_NOTIFY_URL=http://discord_bot:8080
# Clé partagée = API_ADMIN_KEY du bot (le bot valide X-Api-Key)
BOT_NOTIFY_API_KEY=
# Secret partagé pour les callbacks bot→dashboard (header X-Bot-Secret)
BOT_CALLBACK_SECRET=
# 2e flux Power Automate Teams (réponses de formulaire / modal)
TEAMS_WEBHOOK_URL_FORMS=
# ─── Bot Teams (Bot Framework) — checklist interactive du recap ────────────────
# OPTIONNEL. Tant que APP_ID/APP_PASSWORD sont vides, le recap continue via le
# webhook Power Automate (TEAMS_WEBHOOK_URL) — aucun changement de comportement.
# Une fois renseignés ET le bot ajouté à un canal (enregistre la conversation),
# le recap hebdo devient une carte interactive (Action.Execute + refresh) où
# l'on coche « RDV pris » par groupe.
#
# Azure Bot resource → "Microsoft App ID" (client_id de l'app Entra ID du bot)
BOT_FRAMEWORK_APP_ID=
# Secret client de l'app Entra ID (Azure Bot → Configuration → Manage → secret)
BOT_FRAMEWORK_APP_PASSWORD=
# Tenant Microsoft 365 (optionnel ; utile pour single-tenant et l'envoi proactif)
BOT_FRAMEWORK_TENANT_ID=
# Sync archivage apprenants depuis émargement (lecture seule). Base interne z01
# (réseau postgres-production-network) : postgresql://emargement:<pwd>@postgres-production:5432/emargement
EMARGEMENT_DATABASE_URL=
# Lecture stats 01deck (widget non-admin). Base interne z01 :
# postgres://deck:<pwd>@postgres-production:5432/deck
DECK_DATABASE_URL=