-
Notifications
You must be signed in to change notification settings - Fork 17
/
Copy path.env.sample
181 lines (142 loc) · 6.99 KB
/
.env.sample
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
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
# ## backend
# used with sqlx
DATABASE_URL=postgres://postgres:password@localhost/ji-jicloud-dev
# port that the API should run on
LOCAL_API_PORT=8080
# unused for now, but needs to be set.
LOCAL_PAGES_PORT=8081
# port that the media transformation service runs on
LOCAL_MEDIA_TRANSFORM_PORT=8082
# to access google cloud
GOOGLE_APPLICATION_CREDENTIALS_DEV_SANDBOX="PATH/TO/gcp-dev-sandbox.json"
GOOGLE_APPLICATION_CREDENTIALS_DEV_RELEASE="PATH/TO/gcp-dev-release.json"
# google project id
PROJECT_ID=
# google eventarc topic names
GOOGLE_EVENTARC_MEDIA_UPLOADED_TOPIC=
GOOGLE_EVENTARC_MEDIA_PROCESSED_TOPIC=
# google translation api
GOOGLE_API_KEY=
# all of these are optional, but if any are missing, S3 will be disabled.
# related routes will return "501 - Not Implemented" and emit a warning.
# s3 connection
S3_ENDPOINT=http://127.0.0.1:9000
GOOGLE_S3_ACCESS_KEY=this-is-a-key
GOOGLE_S3_ACCESS_SECRET=password1
# The s3 bucket that is used for media.
S3_BUCKET=test-bucket
# The s3 bucket that should be used for media processing, e.g. image transformation
S3_PROCESSING_BUCKET=
# Disable S3 locally (avoiding the warnings for missing secrets)
# if specified in a way that maps to `true` (currently "true", "1", "y"), all s3 related services will be disabled
# all related routes will return "501 - Not Implemented".
# S3_LOCAL_DISABLE_CLIENT=false
# algolia things
# The ID of the algolia application.
# Is optional. If missing, all algolia related services will be disabled,
# all related routes will return "501 - Not Implemented" and a warning will be emitted.
ALGOLIA_PROJECT_ID=<algolia_project_id>
# The indices to use for indexing and backend searches.
# Are optional. If missing, indexing will be disabled,
# search related routes will return a "501 - Not Implemented" and a warning will be emitted.
ALGOLIA_MEDIA_INDEX=<index_name>
ALGOLIA_JIG_INDEX=<index_name>
ALGOLIA_PLAYLIST_INDEX=<index_name>
ALGOLIA_CIRCLE_INDEX=<index_name>
ALGOLIA_PUBLIC_USER_INDEX=<index_name>
ALGOLIA_RESOURCE_INDEX=<index_name>
ALGOLIA_COURSE_INDEX=<index_name>
# The key the backend uses for managing- indexing-.
# Needs the `addObject`, `deleteObject`, `settings`, and `editSettings` ACLs and access to.
# Is optional. If missing, indexing will be disabled, and a warning will be logged.
ALGOLIA_MANAGEMENT_KEY=<key>
# The key that the backend uses for searching.
# Needs the `search` ACL with access to.
# Is optional. If missing, searching will be disabled, attempting
# to use search related routes will return a "501 - Not Implemented" and a warning will be logged.
ALGOLIA_BACKEND_SEARCH_KEY=<key>
# The key to use for the *frontend* for the algolia client.
# This key should be ratelimited, and restricted to a specific set of indecies:
# *possibly* and *definitely* any search suggestion indecies related to it.
# Is optional, if not present, routes related to creating search keys for the frontend will return "501 - Not Implemented" and a warning will be logged.
ALGOLIA_FRONTEND_SEARCH_KEY=<key>
# disable google cloud
DISABLE_GOOGLE_CLOUD=true
# SENTRY_DSN_API - get from Sentry Client Keys
SENTRY_DSN_API="https://sentry-foo"
# When enabled, this will also disable the actix logging middleware and enable
# the tracing middleware.
ENABLE_TRACING_LOGS="true"
# BING_SEARCH_KEY- Used to search for image search via bing
BING_SEARCH_KEY=<key>
# Must be 32 bytes of hex
# note: DON'T USE THIS DEFAULT ONE.
TOKEN_SECRET="0000000000000000000000000000000000000000000000000000000000000000"
# How long *login* tokens are valid for (measured in seconds).
# This environment variable can only be set on `local`
# This environment variable is optional, if missing it will use the server's compiled default (an indeterminate but reasonable amount of time)
# LOGIN_TOKEN_VALID_DURATION=
# ID of the google oauth client.
# Is optional. If missing, all google-oauth related services will be disabled,
# all related routes will return "501 - Not Implemented" and a warning will be emitted.
GOOGLE_OAUTH_CLIENT=
# Secret for the google oauth client.
# Is optional. If missing, all google-oauth related services will be disabled,
# all related routes will return "501 - Not Implemented" and a warning will be emitted.
GOOGLE_OAUTH_SECRET=
# # Sendgrid / email client variables.
# Disable email client locally (avoiding the warnings for missing secrets)
# If specified in a way that maps to `true` (currently "true", "1", "y"), all mailing related services,
# such as email verification, password resetting, and email changing(1) will be disabled.
# all related routes will return "501 - Not Implemented"
# (1): currently not implemented.
SENDGRID_DISABLE_LOCAL=
# The following email-related keys are optional. If missing, all mailing services will be disabled.
# Sendgrid / email client api key.
SENDGRID_API_KEY=
EMAIL_SENDER_ADDRESS=
EMAIL_SIGNUP_VERIFY_TEMPLATE=
EMAIL_PASSWORD_RESET_TEMPLATE=
EMAIL_WELCOME_JIGZI_TEMPLATE=
# # backend TEST ONLY
# Test credentials and API keys should have very restricted and incrementally granted permissions.
# Comments will indicate which permissions are required for related tests to pass.
# This is most relevant for CI and local testing when required.
# Currently this .env ONLY and does not call the project's GCP secret store to retrieve.
# Sendgrid / email client testing settings:
# Tests requiring email (e.g. email verification, basic auth user create) will pass without verification if this is
# set to "truthy" (i.e. "true", "1", or "y").
TEST_SENDGRID_ENABLE=
# API must have `Send` permissions. No other scopes are required for testing purposes.
TEST_SENDGRID_API_KEY=
TEST_SENDER_EMAIL=
TEST_SIGNUP_VERIFY_TEMPLATE=
TEST_PASSWORD_RESET_TEMPLATE=
# ## frontend
# (frontend only) the local path and port for media/cdn server
LOCAL_CDN_MEDIA_DIR="PATH/TO/ji-cloud-media"
LOCAL_CDN_MEDIA_PORT=4102
LOCAL_CDN_ELEMENTS_PORT=4103
LOCAL_CDN_FRONTEND_MAIN_PORT=4104
LOCAL_CDN_FRONTEND_IFRAME_PORT=4105
LOCAL_CDN_LEGACY_DIR="C:\Users\david\Documents\JI\ji-tap-games"
LOCAL_CDN_LEGACY_PORT=4106
# (frontend only) the local path and port for static spa serving
LOCAL_CDN_FRONTEND_DIR="E:\\ji\\ji-cloud\\frontend"
# (frontend only) to use hardcoded credentials, only applicable to local dev mode
DEV_AUTH=false
# Optional overrides to force hitting remote server instead of local
# These 3 should usually be set for frontend development
LOCAL_API_URL="https://api.sandbox.jigzi.org"
LOCAL_UPLOADS_URL="https://uploads.sandbox.jigzi.org"
LOCAL_MEDIA_URL="https://media.jigzi.org"
LOCAL_LEGACY_URL="https://legacy.jigzi.org"
# These aren't typically set, even for local frontend dev (rather we hit the local livereload server)
LOCAL_PAGES_URL="https://sandbox.jigzi.org"
LOCAL_PAGES_URL_IFRAME="https://sandbox.jigzi.org"
LOCAL_FRONTEND_URL="https://frontend.sandbox.jigzi.org"
# Set this to a hardcoded token to bypass the cookie/csrf mechanism
# To get the value, first login as usual, then grab it from the browser's cookie storage (or server's set-cookie response)
# LOCAL_API_AUTH_OVERRIDE=""
# Set this to enable application flow tracking with Mixpanel
MIXPANEL_PROJECT_TOKEN=<token>