Environment Variables - culinary-code/algemeen GitHub Wiki
Environment variables
Frontend
All environment variables should be put in the .env file. See the .env.template for a quick copy paste of the required structure.
- KEYCLOAK_BASE_URL: Start of the Keycloak url appended before any calls made to Keycloak. Example for local development: "http://localhost:8180"
- KEYCLOAK_CLIENT_ID: Name of your Keycloak client. Example: "flutter-app"
- KEYCLOAK_REALM: Name of your Keycloak realm. Example: "culinary-code-dev-realm"
- BACKEND_BASE_URL: Start of the backend url appended before any calls made to the backend api endpoints. Example for local development: "https://localhost:7098"
- DEVELOPMENT_MODE: A boolean "true" or "false" as strings which will switch the frontend to less safer http calls instead of https with simplified login steps to make development for the app way easier. DO NOT LEAVE THIS ON "false" IN DEPLOYMENT!
Backend
All environment variables should be set in the run configuration. In Rider this can be done through Run > Edit configurations > + (for a new configuration) > Select .NET Project > inside the "Environment variables" all of these should be set.
We have provided a text file with default values that can be changed but be aware that Rider puts '' before special characters when importing these which should be removed.
- ASPNETCORE_ENVIRONMENT=Development; # Development, Staging, Production
- ASPNETCORE_HTTPS_PORT=443;
- ASPNETCORE_URLS=https://0.0.0.0:7098\;http://0.0.0.0:5114;
- AzureOpenAI__ApiKey={YOUR_API_KEY}; # Azure OpenAI Service API key
- AzureOpenAI__Endpoint={YOUR_ENDPOINT}; # Azure OpenAI Service endpoint
- AzureStorage__ConnectionString={YOUR_CONNECTION_STRING}; # Azure Blog Storage connection string for saving recipe images
- AzureStorage__ContainerName={YOUR_CONTAINER_NAME}; # Azure Blog Storage container name for saving recipe images
- Database__ConnectionString={YOUR_CONNECTION_STRING}; # PostgreSQL connection string
- Keycloak__AdminPassword={YOUR_PASSWORD}; # Keycloak admin password
- Keycloak__AdminUsername={YOUR_USERNAME}; # Keycloak admin username (only used for local development)
- Keycloak__BaseUrl=http://localhost:8180; # Keycloak base URL
- Keycloak__ClientId={YOUR_CLIENT_ID}; # Keycloak client ID
- Keycloak__FrontendUrl=http://localhost:8180; # Keycloak frontend URL in case the issuer URL is different than the base URL
- Keycloak__Realm={YOUR_REALM}; # Keycloak realm
- LocalLlmServer__ServerUrl=http://localhost:4891; # Local LLM server URL
- RecipeJob__CronSchedule=0 0 2 * * ?; # Cron schedule for recipe generation job
- RecipeJob__MinAmount=5 # Minimum amount of recipes to maintain in the database, if the amount is lower, the recipe generation job will be triggered at the scheduled time
- EmailService__SmtpClient # Client used for sending invitation emails. Example:"smtp.gmail.com"
- EmailService__SmtpPassword # Password corresponding to the smtpUserName
- EmailService__SmtpUserName # SmptpUsername. Example:"[email protected]"