Environment Variables¶
This page lists runtime variables used by the current Flask app, local services, mailer, and lambda-resize code. The Makefile supplies the local defaults for normal development and testing.
Required¶
DYNAMODB_TABLE_PREFIXPrefix added to every DynamoDB table name. Local defaults use
demo-.PLANTTRACER_S3_BUCKETExisting S3 bucket name. Do not include
s3://. For local MinIO the Makefile usesplanttracer-local.
AWS And Local Service Selection¶
AWS_REGIONAWS region. Use
localfor DynamoDB Local and MinIO.AWS_DEFAULT_REGIONOptional AWS SDK default region. Local Make targets set this to
local.AWS_ACCESS_KEY_ID/AWS_SECRET_ACCESS_KEYAWS credentials. Local MinIO uses
minioadmin/minioadmin.AWS_ENDPOINT_URL_DYNAMODBDynamoDB endpoint override. Local default:
http://localhost:8000/.AWS_ENDPOINT_URL_S3S3 endpoint override. Local default:
http://localhost:9000/.AWS_ENDPOINT_URL_SQSOptional SQS endpoint override for lambda-resize if testing against an SQS emulator.
AWS_PROFILEOptional AWS profile for deployed or administrative commands.
Application URLs¶
PLANTTRACER_API_BASEOptional Flask API base injected into browser pages as
API_BASE. Empty means same-origin.PLANTTRACER_STATIC_BASEOptional static asset base injected as
STATIC_BASE.PLANTTRACER_LAMBDA_API_BASEExplicit lambda-resize HTTP API base injected as
LAMBDA_API_BASE. Local default from the Makefile ishttp://127.0.0.1:9811/.HOSTNAME/DOMAINIf
PLANTTRACER_LAMBDA_API_BASEis absent, Flask deriveshttps://{HOSTNAME}-lambda.{DOMAIN}/.
Demo Mode¶
DEMO_MODEEnables demo mode when present.
DEMO_COURSE_IDIdentifies the course containing demo data. This does not enable demo mode by itself.
Mail¶
SERVER_EMAILSender address for outgoing mail. Defaults to
admin@planttracer.com.PLANTTRACER_CREDENTIALSPath to an INI file with
[smtp]and optional[imap]sections.SMTPCONFIG_JSONJSON SMTP configuration. Local Make targets set this for Mailpit.
SMTPCONFIG_ARNAWS Secrets Manager ARN containing SMTP configuration.
MAILER_DRY_RUNSet to
trueto log email content instead of sending it.
Lambda Queue¶
TRACING_QUEUE_MODESet to
localto use the in-process local retrace queue.TRACING_QUEUE_URLSQS queue URL used by deployed lambda-resize tracing.
Development And Diagnostics¶
LOG_LEVELLogging level. Local Make targets default to
DEBUG.FFMPEG_PATHOptional path used by legacy/local tooling.
COLLECT_JS_COVERAGEWhen true, Flask serves instrumented static files from
static-instrumentedif present.DISABLE_PROXYFIXWhen true, disables Flask
ProxyFixhandling for forwarded headers.AWS_EC2_METADATA_DISABLEDLocal Make targets set this to
trueto avoid AWS metadata lookups.
Local Makefile Defaults¶
The primary local environment is defined by LOCAL_AWS_ENV and
LOCAL_FLASK_ENV in the root Makefile. Prefer these targets over hand-built
commands:
make start-local-services
make make-local-demo
make run-local-debug
make run-local-demo-debug
make run-local-lambda-debug