-
-
Notifications
You must be signed in to change notification settings - Fork 61
/
Copy path.env.example
318 lines (263 loc) · 10.9 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
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
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
# Whether the environment is in debug mode (e.g. Django debug)
# VALUES: 0 - non debug mode; 1 - debug mode
# DEFAULT: 1
DEBUG=1
# Environment where QFieldCloud runs
# VALUES: `development` - local development; `staging` - staging server; `test` - tests; `production` - production server
# DEFAULT: test
ENVIRONMENT=test
QFIELDCLOUD_HOST=localhost
DJANGO_SETTINGS_MODULE=qfieldcloud.settings
DJANGO_ALLOWED_HOSTS="localhost 127.0.0.1 0.0.0.0 app nginx"
SECRET_KEY=change_me
######################
# Certificate settings
######################
# TLS certificate filename from within the `nginx` container.
# For usage with Let's Encrypt certificate, use as:
# QFIELDCLOUD_TLS_CERT="/etc/letsencrypt/live/${QFIELDCLOUD_HOST}/fullchain.pem"
# DEFAULT: "/etc/nginx/certs/${QFIELDCLOUD_HOST}.pem"
QFIELDCLOUD_TLS_CERT="/etc/nginx/certs/${QFIELDCLOUD_HOST}.pem"
# TLS private key filename from within the `nginx` container.
# For usage with Let's Encrypt certificate, use as:
# QFIELDCLOUD_TLS_KEY="/etc/letsencrypt/live/${QFIELDCLOUD_HOST}/privkey.pem"
# DEFAULT: "/etc/nginx/certs/${QFIELDCLOUD_HOST}-key.pem"
QFIELDCLOUD_TLS_KEY="/etc/nginx/certs/${QFIELDCLOUD_HOST}-key.pem"
# TLS DF parameters filename from within the `nginx` container.
# When empty, no DF parameters are used.
# DEFAULT: "/etc/nginx/dhparams/ssl-dhparams.pem"
QFIELDCLOUD_TLS_DHPARAMS="/etc/nginx/dhparams/ssl-dhparams.pem"
LETSENCRYPT_EMAIL="[email protected]"
LETSENCRYPT_RSA_KEY_SIZE=4096
# Set to 1 if you're testing your setup to avoid hitting request limits
LETSENCRYPT_STAGING=1
##################
# Storage settings
##################
# Used to define storages in QFieldCloud. Note the contents of this variable is a superset of Django's `STORAGES` setting.
# NOTE: Note if the `STORAGES` is not available, QFieldCloud will still work with `STORAGE_ACCESS_KEY_ID`, `STORAGE_SECRET_KEY_ID`, `STORAGE_BUCKET_NAME` and `STORAGE_REGION_NAME` from previous QFC versions.
# NOTE: The custom property `QFC_IS_LEGACY` is temporary available to allow migration from the old to the new way of handling files. This option will soon be removed, so you are highly encouraged to migrate all the projects to the new way of handling files.
# NOTE: The `endpoint_url` must be a URL reachable from within docker and the host, the default value `172.17.0.1` for `minio` is the docker network `bridge`. On windows/mac, change the value to "http://host.docker.internal:8009".
# DEFAULT:
# {
# "default": {
# "BACKEND": "qfieldcloud.filestorage.backend.QfcS3Boto3Storage",
# "OPTIONS": {
# "access_key": "minioadmin",
# "secret_key": "minioadmin",
# "bucket_name": "qfieldcloud-local",
# "region_name": "",
# "endpoint_url": "http://172.17.0.1:8009"
# },
# "QFC_IS_LEGACY": false
# }
# }
STORAGES='{
"default": {
"BACKEND": "qfieldcloud.filestorage.backend.QfcS3Boto3Storage",
"OPTIONS": {
"access_key": "minioadmin",
"secret_key": "minioadmin",
"bucket_name": "qfieldcloud-local",
"region_name": "",
"endpoint_url": "http://172.17.0.1:8009"
},
"QFC_IS_LEGACY": false
}
}'
# Setting what is the default storage. If empty, it will use the `default` storage.
# NOTE: The value must be a key of the `STORAGES` setting.
# DEFAULT: ""
# STORAGES_PROJECT_DEFAULT_STORAGE=
# Local admin username configuration for minio storage in local and standalone instances.
# NOTE: Ignored if `minio` is not used.
# NOTE: Needs to be the same as in the `STORAGES` setting in standalone config.
# DEFAULT: MINIO_ROOT_USER=minioadmin
MINIO_ROOT_USER=minioadmin
# Local admin password configuration for minio storage in local and standalone instances.
# NOTE: Ignored if `minio` is not used.
# NOTE: Needs to be the same as in the `STORAGES` setting in standalone config.
# DEFAULT: MINIO_ROOT_PASSWORD=minioadmin
MINIO_ROOT_PASSWORD=minioadmin
# Public port to the minio API endpoint. It must match the configured port in `STORAGE_ENDPOINT_URL`.
# NOTE: Ignored if `minio` is not used.
# NOTE: Needs to be the same as in the `STORAGES` setting in standalone config.
# DEFAULT: 8009
MINIO_API_PORT=8009
# Public port to the minio browser endpoint.
# NOTE: Ignored if `minio` is not used.
# DEFAULT: 8010
MINIO_BROWSER_PORT=8010
WEB_HTTP_PORT=80
WEB_HTTPS_PORT=443
# Messages are logged at the specified level and all more severe levels. The nginx default is `error`. Read more on https://nginx.org/en/docs/ngx_core_module.html#error_log.
# OPTIONS: debug, info, notice, warn, error, crit, alert, emerg
# DEFAULT: error
NGINX_ERROR_LOG_LEVEL=error
###################
# Database settings
###################
POSTGRES_USER=qfieldcloud_db_admin
POSTGRES_PASSWORD=3shJDd2r7Twwkehb
POSTGRES_DB=qfieldcloud_db
POSTGRES_HOST=db
POSTGRES_PORT=5432
# "prefer" OR "require" most of the times
POSTGRES_SSLMODE=prefer
HOST_POSTGRES_PORT=5433
# Docker image tag used for local/standalone database setup.
# See https://hub.docker.com/r/postgis/postgis/tags.
# When setting up a new local instance, do not hesitate to pick a recent version.
# For migrating a local postgis to a more recent major version (risky operation),
# see this gist: https://gist.github.com/gounux/2c0779fcb22e512cbdc613eb78200571 .
# Migration to a newer database version is a risky operation to your data, so prepare and test the backup of the `postgres_data` volume.
POSTGIS_IMAGE_VERSION=13-3.1-alpine
GEODB_HOST=geodb
GEODB_PORT=5432
GEODB_USER=postgres
GEODB_PASSWORD="KUAa7h!G&wQEmkS3"
GEODB_DB=postgres
HOST_GEODB_PORT=5434
# Sentry DSN. Missing value disables Sentry logging. Can be found on https://opengisch.sentry.io/settings/projects/qfieldcloud/keys/ .
# DEFAULT: <NO VALUE>
SENTRY_DSN=
# Sentry sample rate between 0 and 1. Read more on https://docs.sentry.io/platforms/python/configuration/sampling/ .
# DEFAULT: 1
SENTRY_SAMPLE_RATE=1
# Release version shown on sentry. Read more on https://docs.sentry.io/product/releases/.
# DEFAULT: dev
SENTRY_RELEASE=dev
# Memcached port. Exposed only in docker-compose.local.yml
# DEFAULT: 11211
MEMCACHED_PORT=11211
LOG_DIRECTORY=/tmp
TMP_DIRECTORY=/tmp
#########################
# Authentication settings
#########################
# Whether password based login is enabled for QFC clients.
# VALUES: 0 - password login disabled; 1 - password login enabled
# DEFAULT: 1
QFIELDCLOUD_PASSWORD_LOGIN_IS_ENABLED=1
# Social account providers.
#
# Dictionary of OIDC / OAuth2 providers configurations that may be used for
# authentication in this QFC instance.
#
# Refer to django.allauth documentation for more information:
# https://docs.allauth.org/en/dev/socialaccount/providers/index.html
#
# NOTE: Also requires the respective provider to be added to INSTALLED_APPS
# if it's not already contained there.
#
# EXAMPLE:
# SOCIALACCOUNT_PROVIDERS = '{
# "google": {
# "OAUTH_PKCE_ENABLED": true,
# "APP": {
# "client_id": "<client-id>",
# "key": ""
# }
# },
# "github": {
# "APP": {
# "client_id": "<client-id>",
# "secret": "<client-secret>"
# }
# },
# "openid_connect": {
# "OAUTH_PKCE_ENABLED": true,
# "APP": {
# "provider_id": "keycloak",
# "name": "Keycloak",
# "client_id": "<client-id>",
# "settings": {
# "server_url": "https://keycloak.local/realms/myrealm/.well-known/openid-configuration"
# }
# }
# }
# }'
#
# DEFAULT: {}
SOCIALACCOUNT_PROVIDERS='{}'
ACCOUNT_EMAIL_VERIFICATION=optional
EMAIL_HOST=smtp4dev
EMAIL_USE_TLS=False
EMAIL_USE_SSL=False
EMAIL_PORT=25
EMAIL_HOST_USER=user
EMAIL_HOST_PASSWORD=password
DEFAULT_FROM_EMAIL="webmaster@localhost"
# Docker compose default network also used by the docker in docker workers
# If empty value, a default name will be generated at build time, for example `qfieldcloud_default`.
# DEFAULT: ""
# QFIELDCLOUD_DEFAULT_NETWORK=""
# Admin URI. Requires slash in the end. Please use something that is hard to guess.
# DEFAULT: "admin/"
QFIELDCLOUD_ADMIN_URI=admin/
# QFieldCloud URL used within the worker as configuration for qfieldcloud-sdk.
# DEFAULT: "http://app:8000/api/v1/"
QFIELDCLOUD_WORKER_QFIELDCLOUD_URL=http://app:8000/api/v1/
# number of parallel workers
# DEFAULT: 1
QFIELDCLOUD_WORKER_REPLICAS=1
# QFieldCloud subscription model
# DEFAULT: subscription.Subscription
QFIELDCLOUD_SUBSCRIPTION_MODEL=subscription.Subscription
# QFieldCloud auth token expiration hours. For example 720 hours (30 days).
# DEFAULT: 720
QFIELDCLOUD_AUTH_TOKEN_EXPIRATION_HOURS=720
# Whether QFieldCloud should be translated in another language other than English.
# NOTE if there is no full translation in given language, QFieldCloud will be shown in mixture of English and the given language. Also installed Django modules have their own translations that might not be complete.
# VALUES: 0 - English only; 1 - enable other languages
# DEFAULT: 1
QFIELDCLOUD_USE_I18N=1
# QFieldCloud default language that is displayed in the interface
# DEFAULT: "en"
QFIELDCLOUD_DEFAULT_LANGUAGE="en"
# QFieldCloud default timezone that is used when account has no timezone
# DEFAULT: "Europe/Zurich"
QFIELDCLOUD_DEFAULT_TIME_ZONE="Europe/Zurich"
# QFieldCloud QGIS image name to be used as worker by the `worker_wrapper`.
# If empty value, a default name will be generated at build time, for example `qfieldcloud-qgis`.
# DEFAULT: ""
# QFIELDCLOUD_QGIS_IMAGE_NAME=""
# QFieldCloud `libqfieldsync` volume path to be mounted by the `worker_wrapper` into `worker` containers.
# If empty value or invalid value, the pip installed version defined in `requirements_libqfieldsync.txt` will be used.
# DEFAULT: ""
QFIELDCLOUD_LIBQFIELDSYNC_VOLUME_PATH=""
# QFieldCloud SDK volume path to be mounted by the `worker_wrapper` into `worker` containers.
# If empty value or invalid value, the pip installed version defined in `requirements_libqfieldsync.txt` will be used.
# DEFAULT: ""
QFIELDCLOUD_QFIELDCLOUD_SDK_VOLUME_PATH=""
# The Django development port. Not used in production.
# DEFAULT: 8011
DJANGO_DEV_PORT=8011
GUNICORN_TIMEOUT_S=300
GUNICORN_MAX_REQUESTS=300
GUNICORN_WORKERS=3
GUNICORN_THREADS=3
# Not used in production.
# DEFAULT: 8012
SMTP4DEV_WEB_PORT=8012
# Not used in production.
# DEFAULT: 25
SMTP4DEV_SMTP_PORT=25
# Not used in production.
# DEFAULT: 143
SMTP4DEV_IMAP_PORT=143
# Prefix used by docker compose for each of the containers, e.g. app will be `qfieldcloud_app`
# DEFAULT: qfieldcloud
COMPOSE_PROJECT_NAME=qfieldcloud
# List of docker compose files
# DEFAULT: docker-compose.yml:docker-compose.override.local.yml
COMPOSE_FILE=docker-compose.yml:docker-compose.override.local.yml:docker-compose.override.standalone.yml
# Separator in `COMPOSE_FILE` between filenames. Required for making COMPOSE_FILE above cross-platform (do not change)
# DEFAULT: :
COMPOSE_PATH_SEPARATOR=:
# Debugpy port used for the `app` service
# DEFAULT: 5678
DEBUG_DEBUGPY_APP_PORT=5678
# Debugpy port used for the `worker_wrapper` service
# DEFAULT: 5679
DEBUG_DEBUGPY_WORKER_WRAPPER_PORT=5679