-
Notifications
You must be signed in to change notification settings - Fork 88
/
.env.example
61 lines (46 loc) · 2.54 KB
/
.env.example
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
# Create a .env file based off of his example.
##### PRODUCTION VALUES ######
# Environment variables when app is hosted in Azure App service.
# When you create or update a container app using the Azure portal or Azure CLI, you set
# these variables via a command parameter or the portal UI. However, when you create
# a container app using the VS Code extension, you must create a .env file with
# the environment variables set for the extension to read.
# RUNNING_IN_PRODUCTION=1
# DBHOST=<host-name>
# DBNAME=<database-name>
# DBUSER=<managed identity name>
# AZURE_CLIENT_ID=<managed identity app/client ID>
# AZURE_SECRET_KEY=<secret key>
# Set RUNNING_IN_PRODUCTION only when running in Azure Container Apps environment
# Set DBHOST to the name of the server, i.e. my_postgresql_server
# Set DBUSER to the name of the managed identity assigned to the container app. Make sure the managed
# identity is added as a ROLE to the server and has the necessary PostgreSQL permissions on the database.
# Set AZURE_CLIENT_ID to the app/client ID of the managed identity
# Set AZURE_SECRET_KEY to the production secret key
# Create the production secret key value with the following command:
# python -c 'import secrets; print(secrets.token_hex())'
##### DEVELOPMENT VALUES ######
# Set secret key value to a random string
# LOCAL_SECRET_KEY=123abc
# In development, you have the choice of hosting a PostgreSQL server locally or in Azure. The environment
# variables you need to set are different for each case.
# Local PostgreSQL connection info. Set these when running your PostgreSQL server locally.
# DBHOST=<host-name>
# DBNAME=<database-name>
# DBUSER=<db-username>
# DBPASS=<db-password>
# Set DBHOST to the full URL to the host.
# Remote PostgreSQL connection info. Set these when connecting to a PostgreSQL server in Azure.
# USE_REMOTE_POSTGRESQL=1
# DBHOST=<host-name>
# DBNAME=<database-name>
# DBUSER=<service principal name>
# Set DBHOST to the name of the server, i.e. my_postgresql_server.
# Set DBUSER to the name of the application service principal. Make sure the service prinicipal
# is added as a ROLE to the server and has the necessary PostgreSQL permissions on the database.
# To connect to an Azure PostgreSQL server when your app is hosted locally, you also
# need to set environment variables that identify the service principal to DefaultAzureCredential
# so that it can return an acceess token for it.
# AZURE_CLIENT_ID=<service principal client ID>
# AZURE_TENANT_ID=<service principal tenant ID>
# AZURE_CLIENT_SECRET=<service principal password>