Repository navigation
Expand file tree
/
Copy path.env.dev.example
More file actions
73 lines (68 loc) · 3.24 KB
/
Copy path.env.dev.example
File metadata and controls
73 lines (68 loc) · 3.24 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
# ============================================
# WhoseOnFirst — .env.dev.example
# ============================================
# Template for optional local-dev overrides.
#
# You do NOT need this file to run the dev container. `docker-compose.dev.yml`
# sets all required environment variables inline with safe mock defaults.
#
# Copy this file to `.env.dev` (which is gitignored) ONLY if you need to
# override one of the inline defaults for a specific local testing scenario,
# such as:
#
# - Running a one-off "real SMS test" to your own cell phone (see the
# real-sms-test runbook in DocVault — to be written in WHO-49 Phase 3)
# - Pointing at a non-default NOTIFICATION_HOUR to watch the scheduler
# fire on demand
# - Bumping LOG_LEVEL to something other than DEBUG
#
# To actually load this file, uncomment the `env_file:` stanza in
# `docker-compose.dev.yml` (it is commented out by default for safety)
# and rebuild/restart the container. Without that stanza, docker-compose
# does NOT read this file — the inline `environment:` values in the
# compose file are the only source of truth by default. Keys defined
# here will override any matching inline values.
#
# SAFETY WARNING
# --------------
# Never copy your production `.env` contents into this file. The dev
# container is designed to be incapable of sending real SMS under normal
# operation, protected by two independent walls:
#
# 1. SMS_MOCK_MODE=true in docker-compose.dev.yml is the primary rail —
# SMSService.__init__ short-circuits Twilio client creation entirely,
# so there is no client object in memory to reach Twilio with.
# 2. The fake Twilio placeholder values in docker-compose.dev.yml are a
# second wall — they ARE non-empty, so they would pass the "all three
# present" presence check if mock mode were disabled, but the Twilio
# SDK would then 401 on the first real API call (loud failure, not
# silent delivery).
#
# Arming the dev container to send real messages requires BOTH flipping
# SMS_MOCK_MODE to false AND replacing all three placeholders with real
# Twilio credentials — and even then, this should only happen as part of
# the documented real-sms-test runbook (WHO-49 Phase 3, not yet written),
# never ad-hoc.
# ============================================
# ----- SMS configuration -----
# Leave SMS_MOCK_MODE=true unless you are running the real-SMS-test runbook.
# Setting it to false without also providing valid Twilio credentials will
# cause the app to crash at startup with TwilioConfigurationError.
SMS_MOCK_MODE=true
# Fake Twilio values (kept to match the compose file, never used while
# mock mode is active)
TWILIO_ACCOUNT_SID=ACdev_mock_account_sid_not_real
TWILIO_AUTH_TOKEN=dev_mock_auth_token_not_real
TWILIO_PHONE_NUMBER=+15550000000
# ----- Notification schedule -----
# Uncomment and change to fire the scheduler on demand during testing.
# Example: set to "now + 2 minutes" so you can observe the mock SMS log line
# without waiting until 8 AM CST the next morning.
# NOTIFICATION_HOUR=14
# NOTIFICATION_MINUTE=30
# NOTIFICATION_TIMEZONE=America/Chicago
# ----- Logging -----
# LOG_LEVEL=DEBUG
# ----- Security -----
# Dev-only value. Never reuse a production SECRET_KEY here.
SECRET_KEY=dev-only-secret-key-do-not-use-in-production