-
-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy path.env.example
More file actions
130 lines (110 loc) · 4.38 KB
/
Copy path.env.example
File metadata and controls
130 lines (110 loc) · 4.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
# Milestone - Environment Configuration
# Copy this file to .env and update values for your environment
#
# IMPORTANT: Never commit .env files with real credentials!
# ============================================
# APPLICATION
# ============================================
DEBUG=false
PORT=8485
# ============================================
# DATABASE (PostgreSQL) - TENANT DATABASE
# ============================================
# For single-tenant mode, this is your main database
# For multi-tenant mode, this is ignored (uses the MASTER_DB_* settings below)
# Option 1: Individual settings
DB_HOST=localhost
DB_PORT=5432
DB_NAME=milestone
DB_USER=milestone
DB_PASSWORD=your_secure_password_here
DB_SSL=false
# Option 2: Connection URL (overrides individual settings)
# DATABASE_URL=postgresql://milestone:password@localhost:5432/milestone
# Connection pool settings
DB_POOL_SIZE=20
DB_POOL_MAX_OVERFLOW=10
DB_POOL_TIMEOUT=30
# ============================================
# SESSION & SECURITY
# ============================================
# Secret key for session signing (change this in production!)
# Generate with: python -c "import secrets; print(secrets.token_hex(32))"
SESSION_SECRET=change-this-to-a-random-64-character-string-in-production
# Session cookie settings
SESSION_COOKIE_NAME=connect.sid
SESSION_MAX_AGE=86400
# Set to true when serving over HTTPS (marks cookies as Secure)
SECURE_COOKIES=false
# CORS allowed origins (comma-separated)
# Required for production if frontend is on a different origin
# If not set: allows localhost in debug mode, blocks all cross-origin in production
# CORS_ORIGINS=https://app.example.com,https://admin.example.com
# ============================================
# MULTI-TENANT MODE
# ============================================
# Set to true for multi-tenant deployment
MULTI_TENANT=false
# Default tenant slug (optional, for development)
DEFAULT_TENANT=
# Master database (required for multi-tenant mode)
# This stores tenant configurations and admin users
MASTER_DB_HOST=localhost
MASTER_DB_PORT=5432
MASTER_DB_NAME=milestone_master
MASTER_DB_USER=postgres
MASTER_DB_PASSWORD=your_master_password
# PostgreSQL admin credentials (for auto-provisioning tenant databases)
# Needs CREATEDB and CREATEROLE privileges
PG_ADMIN_USER=postgres
PG_ADMIN_PASSWORD=your_postgres_admin_password
# Encryption key for tenant database credentials (32 bytes, hex encoded)
# Generate with: python -c "import secrets; print(secrets.token_hex(32))"
# REQUIRED for multi-tenant mode!
TENANT_ENCRYPTION_KEY=
# ============================================
# MICROSOFT ENTRA SSO (Optional)
# ============================================
# Configure in the Settings modal within the app, or set here:
# SSO_ENABLED=false
# SSO_CLIENT_ID=your-azure-app-client-id
# SSO_CLIENT_SECRET=your-azure-app-client-secret
# SSO_TENANT_ID=your-azure-tenant-id
# SSO_REDIRECT_URI=http://localhost:8485/api/auth/sso/callback
# ============================================
# EXTERNAL APIs
# ============================================
# Bank holiday API (Nager)
# The legacy v3 API (https://date.nager.at/api/v3) is still accepted and
# detected automatically, but reaches end of life on 2027-01-31.
NAGER_API_URL=https://nagerholidays.com/api/v4
# ============================================
# OUTBOUND PROXY (Optional, corporate networks)
# ============================================
# Used for outbound HTTP (Nager holiday API, Microsoft Graph). PAC files supported.
# HTTP_PROXY=http://proxy.example.com:8080
# HTTPS_PROXY=http://proxy.example.com:8080
# PROXY_USERNAME=
# PROXY_PASSWORD=
# PROXY_PAC_URL=
# PROXY_VERIFY_SSL=true
# PROXY_CA_CERT=
# ============================================
# AUTO-INITIALIZATION (fresh installs)
# ============================================
# When true, the container runs app.scripts.init_db on start (creates the
# schema and seeds an admin). Password is auto-generated and printed in the
# container logs if INIT_ADMIN_PASSWORD is left empty.
# AUTO_INIT_DB=false
# INIT_ADMIN_EMAIL=admin@milestone.local
# INIT_ADMIN_PASSWORD=
# ============================================
# FRESH INSTALL (docker-compose.fresh.yml)
# ============================================
# Override these to avoid conflicts with existing containers/ports
# FRESH_APP_PORT=8486
# FRESH_DB_PORT=5433
# ============================================
# TIMEZONE
# ============================================
TZ=Europe/Zurich