#!/usr/bin/env bash # Default configs for the app. override these in .env or in your OS environment. # # DO NOT EDIT THIS FILE, you should override these variables in .env instead # # If you are changing or adding defaults *for everyone*, you can do it here, # but please make sure they are in sync with the defaults in docker-compose.yml. default() { local __var="$1"; shift local __val="$1"; shift [[ -z "${!__var}" ]] && export "$__var"="$__val" } # Specify the port for ocw-web. default APP_PORT 9000 # Specify the port for the database. default DB_PORT 5432 default HTTP_PORT 6001 default HTTPS_PORT 6000 # note: for local dev, must be localhost for login to work default LISTEN_HOST localhost # variables for accessing cockroachdb. # Note: these are provided for overriding convenience only. Scripts and the app # should only rely on the value of $DYNA_URL. default DB_HOST localhost default DB_USER root default DB_NAME opencourseworld # General app configs default ENABLE_API_DEV_USER true default FORCE_HTTP false default DEBUG_LEVEL light default COURSE_IMPORT_REQUIRE_VERIFY false default COURSE_IMPORT_ENABLE_CACHE true default USE_DUMP_FOR_SEARCHES false default MIXED_DIFFICULTY false default DATA_VIEW_TYPE combined_dyna default DATA_DIR ./data # Location of dumps on your system, if in use. Note: if using docker, # these must live in ./data, and you should use a symbolic link if you # need them elsewhere. default DUMP_FILENAME ./data/dumps/dump.db default DUMP_THUMBS_FILENAME ./data/dumps/dump_thumbs.db # A secret to use for logins. Does not have to be secure in local dev. default JWT_SECRET localdev # can be overridden to cockroach or psql, depending on which interface # you prefer. by default we try to detect which is installed. default DB_CONSOLE_TYPE auto # can be overridden to cockroach or psql, depending on which interface # you prefer. by default we try to detect which is installed. default DB_CONSOLE_TYPE auto default TWITCH_CLIENT_ID ufm5q62qafbnkp3leizjli8z89xo9w default TWITCH_CLIENT_SECRET 'please set TWITCH_CLIENT_SECRET in .env' default DISCORD_CLIENT_ID 1080395755581349908 default DISCORD_CLIENT_SECRET 'please set DISCORD_CLIENT_SECRET in .env' default DISCORD_REPORT_TOKEN 'please set DISCORD_REPORT_TOKEN in .env' default ENABLE_TAGS true default DB_SCHEMA_NAME smm2srv default AWS_ACCESS_KEY_ID 'please set AWS_ACCESS_KEY_ID in .env' default AWS_SECRET_ACCESS_KEY 'please set AWS_SECRET_ACCESS_KEY in .env' default APP_URLS "http://$LISTEN_HOST:$APP_PORT" default API_URLS "http://$LISTEN_HOST:$HTTP_PORT,https://$LISTEN_HOST:$HTTPS_PORT" default REDIRECT_URLS "http://$LISTEN_HOST:$HTTP_PORT/api/connect/discord/callback" default DYNA_URL "postgres://$DB_HOST:$DB_PORT/$DB_NAME?sslmode=disable&user=$DB_USER&options=-c%20search_path%3D$DB_SCHEMA_NAME,public" default LISTEN_ADDRESS "$LISTEN_HOST:$HTTPS_PORT" default LISTEN_ADDRESS_HTTP "$LISTEN_HOST:$HTTP_PORT" default DNS_WHITELIST "$LISTEN_HOST:$HTTPS_PORT,$LISTEN_HOST:$HTTP_PORT"