forked from compdemocracy/polis
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathexample.env
More file actions
213 lines (179 loc) · 7 KB
/
example.env
File metadata and controls
213 lines (179 loc) · 7 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
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
# Copy this file to .env and fill in the values, # or set the values in your environment as needed.
# docker compose (if used) will read from .env. This file is also used by the server app.
###### GENERAL SETTINGS ######
ADMIN_UIDS=["admin@polis.test"]
# Options: maildev, aws-ses, mailgun
# Example: `aws-ses,mailgun` would try sending via AWS SES first, and fallback to Mailgun on error.
EMAIL_TRANSPORT_TYPES=maildev
# Optionally set this manually or use `git rev-parse HEAD`. It can be useful for debugging.
GIT_HASH=
# Options: prod, preprod, dev:
MATH_ENV=prod
# Options: debug, info, warn, error, fatal. Default is warn.
MATH_LOG_LEVEL=
# Optionally give the server container a distinct env_file. Useful for CI tests.
SERVER_ENV_FILE=.env
# Used by winston via server/utils/logger. Defaults to "warn".
SERVER_LOG_LEVEL=
###### DATABASE ######
# Optional DB replica for reads:
READ_ONLY_DATABASE_URL=
# Required for using dockerized postgres (ie --profile postgres).
POSTGRES_DB=polis-dev
POSTGRES_PORT=5432
POSTGRES_HOST=postgres:${POSTGRES_PORT}
POSTGRES_USER=postgres
POSTGRES_PASSWORD=oiPorg3Nrz0yqDLE
# Always required. Replace with your own database URL if not using dockerized postgres.
DATABASE_URL=postgres://postgres:oiPorg3Nrz0yqDLE@postgres:5432/polis-dev
# Makefile will read this to determine if the database is running in a docker container.
POSTGRES_DOCKER=true
###### DOCKER CONCERNS ######
# Optionally set this to whatever you want. It is a convenience for docker assets.
TAG=dev
COMPOSE_PROJECT_NAME=polis-${TAG}
# Makefile will read this to determine if local services (dynamodb, minio, ollama) should be started.
LOCAL_SERVICES_DOCKER=true
###### PORTS ######
API_SERVER_PORT=5000
HTTP_PORT=80
HTTPS_PORT=443
STATIC_FILES_PORT=8080
# These ports could actually be different in development or if you are hosting clint-admin,
# client-participation, and file-server on different servers or containers.
STATIC_FILES_ADMIN_PORT=${STATIC_FILES_PORT}
STATIC_FILES_PARTICIPATION_PORT=${STATIC_FILES_PORT}
###### EMAIL ADDRESSES ######
ADMIN_EMAIL_DATA_EXPORT_TEST=
ADMIN_EMAIL_DATA_EXPORT=
ADMIN_EMAIL_EMAIL_TEST=
ADMIN_EMAILS=[]
POLIS_FROM_ADDRESS="Example <team@example.com>"
###### BOOLEAN FLAGS ######
# Instructs the API server to cache the results from the math service. Default is true if not set.
CACHE_MATH_RESULTS=
# The following flags will all default to false if not set.
BACKFILL_COMMENT_LANG_DETECTION=
# Set to `true` for some production environments:
DATABASE_SSL=
# Set to `false` for production:
DEV_MODE=true
RUN_PERIODIC_EXPORT_TESTS=
# When true, logs are written to server/logs in addition to stdout.
# If docker compose is used, the logs directory is mounted as a persistent volume.
SERVER_LOG_TO_FILE=
SHOULD_USE_TRANSLATION_API=
###### CUSTOM URL/HOSTNAME SETTINGS ######
# If you are running a development server anywhere other than localhost:80 or localhost:5000,
# you need to update API_DEV_HOSTNAME and EMBED_SERVICE_HOSTNAME.
API_DEV_HOSTNAME=localhost
# If you are running polis on a custom domain, set both API_PROD_HOSTNAME and DOMAIN_OVERRIDE
# to the same value. In the future these will be combined into one setting.
API_PROD_HOSTNAME=pol.is
DOMAIN_OVERRIDE=
DOMAIN_WHITELIST_ITEM_01=
DOMAIN_WHITELIST_ITEM_02=
DOMAIN_WHITELIST_ITEM_03=
DOMAIN_WHITELIST_ITEM_04=
DOMAIN_WHITELIST_ITEM_05=
DOMAIN_WHITELIST_ITEM_06=
DOMAIN_WHITELIST_ITEM_07=
DOMAIN_WHITELIST_ITEM_08=
# In production, should match API_PROD_HOSTNAME or DOMAIN_OVERRIDE, if set:
EMBED_SERVICE_HOSTNAME=localhost
# Full hostname with protocol of your API server:
# (Optional. Currently only used in client-report development.)
SERVICE_URL=
STATIC_FILES_HOST=file-server
###### THIRD PARTY API CREDENTIALS ######
# These are all optional, but some features will not work without them.
AKISMET_ANTISPAM_API_KEY=
# To enable Google Analytics, set this to your tracking id:
GA_TRACKING_ID=
# One of the following is required if SHOULD_USE_TRANSLATION_API is true:
GOOGLE_CREDENTIALS_BASE64=
GOOGLE_CREDS_STRINGIFIED=
MAILGUN_API_KEY=
MAILGUN_DOMAIN=
# Read from process.env by aws-sdk
# https://docs.aws.amazon.com/sdk-for-javascript/v2/developer-guide/loading-node-credentials-environment.html
AWS_REGION=
AWS_ACCESS_KEY_ID=
AWS_SECRET_ACCESS_KEY=
# This value is written by the server app if SHOULD_USE_TRANSLATION_API is true.
GOOGLE_APPLICATION_CREDENTIALS=
# Optional API keys for other services:
ANTHROPIC_API_KEY=
GEMINI_API_KEY=
OPENAI_API_KEY=
# A value in miliseconds for caching AI responses for narrativeReport
MAX_REPORT_CACHE_DURATION=
###### DATADOG ######
DD_API_KEY=
DD_APPLICATION_ID=
DD_CLIENT_TOKEN=
DD_SITE=
###### SENTENCE TRANSFORMER ######
# Default model for English text (384-dimensional embeddings)
SENTENCE_TRANSFORMER_MODEL=all-MiniLM-L6-v2
# Alternative multilingual model (uncomment to use)
# SENTENCE_TRANSFORMER_MODEL=sentence-transformers/paraphrase-multilingual-MiniLM-L12-v2
###### DYNAMODB ######
# When using local DynamoDB, this should be http://dynamodb:8000.
# In production leave it blank.
DYNAMODB_ENDPOINT=http://host.docker.internal:8000
###### OLLAMA #####
OLLAMA_HOST=http://host.docker.internal:11434
OLLAMA_MODEL=llama3.1:8b
###### S3 STORAGE ######
# MinIO configuration for local S3-compatible storage
AWS_S3_ENDPOINT=http://minio:9000
AWS_ACCESS_KEY_ID=minioadmin
AWS_SECRET_ACCESS_KEY=minioadmin
AWS_S3_BUCKET_NAME=polis-delphi
AWS_REGION=us-east-1
###### OIDC Config ######
AUTH_AUDIENCE=users
AUTH_CERTS_PATH=~/.simulacrum/certs
AUTH_CLIENT_ID=dev-client-id
AUTH_CLIENT_SECRET=dev_auth-client_secret
AUTH_DOMAIN=localhost:3000
AUTH_ISSUER=https://localhost:3000/
AUTH_KEYS_PATH=./server/keys
AUTH_NAMESPACE=https://pol.is/
AUTH_SIMULATOR_PORT=3000
JWKS_URI=https://host.docker.internal:3000/.well-known/jwks.json
JWT_PRIVATE_KEY_PATH=/app/keys/jwt-private.pem
JWT_PUBLIC_KEY_PATH=/app/keys/jwt-public.pem
OIDC_CACHE_KEY_ID_TOKEN_SUFFIX=@@user@@
OIDC_CACHE_KEY_PREFIX=oidc.user
# for production:
# JWT_PRIVATE_KEY=base64-encoded-key
# JWT_PUBLIC_KEY=base64-encoded-key
# In-house JWT Configuration (for XID and anonymous participants)
POLIS_JWT_AUDIENCE=participants
POLIS_JWT_ISSUER=https://pol.is/
# Treevite login code lookup pepper (used for SHA-256 lookup hash)
LOGIN_CODE_PEPPER=change-this-in-prod
###### CLIENT PARTICIPATION ALPHA (optional) ######
INTERNAL_SERVICE_URL=http://host.docker.internal:5000/api/v3
PUBLIC_SERVICE_URL=http://localhost/api/v3
# Decimal between 0.0 and 1.0. This determines how frequently to
# pull the next comment from selected topics, if available.
TOPICAL_COMMENT_RATIO=0.6
###### CLIENT SIDE CONFIG ######
# If building client assets, only the following variables are needed:
# * AUTH_AUDIENCE
# * AUTH_CLIENT_ID
# * AUTH_ISSUER
# * EMBED_SERVICE_HOSTNAME
# * GA_TRACKING_ID
# * OIDC_CACHE_KEY_PREFIX
# * OIDC_CACHE_KEY_ID_TOKEN_SUFFIX
# * SERVICE_URL
###### DEPRECATED ######
# (Deprecated) Used internally by Node.Crypto to encrypt/decrypt IP addresses.
ENCRYPTION_PASSWORD_00001=
# (Deprecated) Basic Auth settings for certain requests between math and api services.
WEBSERVER_PASS=ws-pass
WEBSERVER_USERNAME=ws-user