Configuration
Environment variables
Managing environment variables
During development, create an .env file at the project root to store your environment file.
You can duplicate the .env.template file.
Note
All default values are made to be production ready when serving using Dockerized AWS Lambda Serverless function.
Security breach
YOU MUST NOT FORCE/COMMIT/PUSH the .env file as it will contain your credentials. Doing so will get you some trouble.
When deploying the application to AWS EC2, Lambda or Fargate all environments are sets using the terraform.
Available environment variables
API_CONFIG_FILE
Default : config/api.yaml
Your RAG application need a configuration file. Usually it'll be stored in config/api.yaml.
But some time you need to use a different configuration, let's say for testing or creating another instance
for an A/B testing. The path file is relative to the root of the projet.
AUTO_RELOAD
Default : False
During development restarting the application every time you make a change is tiresome and troublesome.
As with many modern framework you can set it to autoreload when your source code change. To activate this
feature pass true to the var : AUTO_RELOAD=True
LOG_LEVEL
Default : INFO
You can set the log level to : DEBUG, INFO, WARNING, ERROR or CRITICAL.
HOST
Default : 0.0.0.0
Change the default listening address to limit the access from a specific network IP address.
This default allow access using any IP address mapped assigned to the server network interfaces. If you don't know what you are doing, feel free to leave this as is, it's an admin oriented var.
During local development if you want to restrict it to your own usage and prevent external access,
you can set it to 127.0.0.1 (localhost).
If you are running this project through docker, use the normal docker syntaxe --port syntax instead.
PORT
Default : 8080
The default correspond to the expected serving port for dockerized AWS Lambda serverless functions.
During local development, if you have another application already listening on port 8080
(chances are great now days), change it using this environment.
If you are running this project through docker, use the normal docker syntax --port instead.