-
Notifications
You must be signed in to change notification settings - Fork 189
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* update configuration.md * change STATIC_FILES_CLIENT_PORT to STATIC_FILES_PARTICIPATION_PORT; typo and organization of configuration.md. * Creating an upgrading.md document with config changes * update upgrading.md * use BOLD MONO style for env vars * CACHE_MATH_RESULTS default is now true * PR feedback * Add STATIC_FILES_PORT as backup for specific port settings --------- Co-authored-by: Christopher Small <[email protected]>
- Loading branch information
1 parent
fcd6a10
commit 6daa2d6
Showing
10 changed files
with
188 additions
and
56 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
# Upgade Guide | ||
|
||
## Configuration Changes (Q1 2023) | ||
|
||
`polis.config.template.js` and `polis.config.js` files are removed and no longer used. | ||
`docker-dev.env` and `docker-db-dev.env` files are removed and no longer used. | ||
`.env` and/or `prod.env` are now treated as the source of truth for the application and are ignored by git. | ||
See `example.env` for default values. | ||
|
||
Please read [configuration.md](./configuration.md) for more information and a complete list of configuration values. | ||
|
||
Values that have been renamed or replaced: | ||
|
||
- **`DATABASE_FOR_READS_NAME`** has been replaced by **`READ_ONLY_DATABASE_URL`** | ||
- **`PORT`** has been renamed **`API_SERVER_PORT`** | ||
- **`SERVICE_HOSTNAME`** has been renamed to **`EMBED_SERVICE_HOSTNAME`** | ||
- **`STATIC_FILES_ADMINDASH_PORT`** has been renamed to **`STATIC_FILES_ADMIN_PORT`** | ||
|
||
New values: | ||
|
||
- **`API_DEV_HOSTNAME`** | ||
- **`API_PROD_HOSTNAME`** | ||
- **`ENABLE_TWITTER_WIDGETS`** | ||
- **`GA_TRACKING_ID`** | ||
- **`POSTGRES_HOST`** | ||
- **`POSTGRES_PORT`** | ||
- **`SERVER_ENV_FILE`** | ||
- **`SERVER_LOG_LEVEL`** | ||
- **`SERVER_LOG_TO_FILE`** | ||
- **`STATIC_FILES_PARTICIPATION_PORT`** |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -7,25 +7,14 @@ ADMIN_UIDS=[] | |
# 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 | ||
# (Deprecated) Used internally by Node.Crypto. | ||
ENCRYPTION_PASSWORD_00001= | ||
# 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 | ||
# Optionally set this to whatever you want. It is a convenience for docker assets. | ||
TAG=dev | ||
COMPOSE_PROJECT_NAME=polis-${TAG} | ||
# 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 "info". | ||
SERVER_LOG_LEVEL= | ||
# 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= | ||
# (Deprecated) Settings for submitting web requests to the math worker. | ||
WEBSERVER_PASS=ws-pass | ||
WEBSERVER_USERNAME=ws-user | ||
|
||
|
||
###### DATABASE ###### | ||
|
@@ -39,6 +28,12 @@ POSTGRES_USER=postgres | |
DATABASE_URL=postgres://${POSTGRES_USER}:${POSTGRES_PASSWORD}@${POSTGRES_HOST}/${POSTGRES_DB} | ||
|
||
|
||
###### DOCKER CONCERNS ###### | ||
# Optionally set this to whatever you want. It is a convenience for docker assets. | ||
TAG=dev | ||
COMPOSE_PROJECT_NAME=polis-${TAG} | ||
|
||
|
||
###### PORTS ###### | ||
API_SERVER_PORT=5000 | ||
HTTP_PORT=80 | ||
|
@@ -47,7 +42,7 @@ 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_CLIENT_PORT=${STATIC_FILES_PORT} | ||
STATIC_FILES_PARTICIPATION_PORT=${STATIC_FILES_PORT} | ||
|
||
|
||
###### EMAIL ADDRESSES ###### | ||
|
@@ -59,12 +54,16 @@ POLIS_FROM_ADDRESS="Example <[email protected]>" | |
|
||
|
||
###### BOOLEAN FLAGS ###### | ||
# (false by default): | ||
BACKFILL_COMMENT_LANG_DETECTION= | ||
# 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 `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= | ||
|
||
|
||
|
@@ -118,3 +117,11 @@ 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= | ||
|
||
|
||
###### 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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.