forked from City-of-Helsinki/smbackend
-
Notifications
You must be signed in to change notification settings - Fork 2
/
config_dev.env.example
204 lines (177 loc) · 9.74 KB
/
config_dev.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
# Servicemap backend (smbackend) environment configuration
# ========================================================
#
# This file defines a set of (environment) variables that configure most
# of the functionality of smbackend. In order for smbackend to read
# this file, rename it to `config_dev.env`. As the name implies, this
# file is supposed to be used only in development. For production use
# we recommend setting the environment variables using the facilities
# of your runtime environment.
#
# Smbackend reads this file by itself. However, it can also be
# used in conjunction with the included docker-compose.yml. Then
# you don't need to inject the file into the container. Instead
# Docker defines environment variables that smbackend will read.
#
# This file is read by the django-environ parser which is only capable
# of reading key=value pairs + comments.
#
# Following are the settings and their explanations, with example values
# that might be useful for development:
# Whether to run Django in debug mode
# Django setting: DEBUG https://docs.djangoproject.com/en/2.2/ref/settings/#debug
DEBUG=True
# Languages that this smbackend instance will support. This affects
# several things and cannot be changed willy-nilly.
#
# Django setting: LANGUAGES
# https://docs.djangoproject.com/en/2.2/ref/settings/#languages
LANGUAGES=fi,sv,en
# Configures database for smbackend using URL style. The format is
#
# postgis://USER:PASSWORD@HOST:PORT/NAME
#
# Unused components may be left out, only Postgis is supported.
# The example below configures smbackend to use local PostgreSQL database
# called "smbackend", connecting same as username as Django is running as.
# Django setting: DATABASES (but not directly) https://docs.djangoproject.com/en/2.2/ref/settings/#databases
DATABASE_URL=postgis://servicemap:servicemap@postgres/servicemap
# Secret used for various functions within Django. This setting is
# mandatory for Django, but smbackend will generate a key, if it is not
# defined here. Currently smbackend does not use any functionality that
# needs this.
# Django setting: SECRET_KEY https://docs.djangoproject.com/en/2.2/ref/settings/#secret-key
SECRET_KEY=diHylketochorUtHemridEckpebviaftAshthapViajbyxDij
# List of Host-values, that smbackend will accept in requests.
# This setting is a Django protection measure against HTTP Host-header attacks
# https://docs.djangoproject.com/en/2.2/topics/security/#host-headers-virtual-hosting
# Specified as a comma separated list of allowed values. Note that this does
# NOT matter if you are running with DEBUG
# Django setting: ALLOWED_HOSTS https://docs.djangoproject.com/en/2.2/ref/settings/#allowed-hosts
ALLOWED_HOSTS=127.0.0.1,localhost
# List of tuples (or just e-mail addresses) specifying Administrators of this
# smbackend instance. Django uses this only when logging is configured to
# send exceptions to admins. Smbackend does not do this. Still you may want
# to set this for documentation
# Django setting: ADMINS https://docs.djangoproject.com/en/2.2/ref/settings/#admins
# Cookie prefix is added to the every cookie set by smbackend. These are
# mostly used when accessing the internal Django admin site. This applies
# to django session cookie and csrf cookie
# Django setting: prepended to CSRF_COOKIE_NAME and SESSION_COOKIE_NAME
COOKIE_PREFIX=smdev
# Django INTERNAL_IPS setting allows some debugging aids for the addresses
# specified here
# Django setting: INTERNAL_IPS https://docs.djangoproject.com/en/2.2/ref/settings/#internal-ips
INTERNAL_IPS=127.0.0.1
# Specifies a header that is trusted to indicate that the request was using
# https while traversing over the Internet at large. This is used when
# a proxy terminates the TLS connection and forwards the request over
# a secure network. Specified using a tuple.
# Django setting: SECURE_PROXY_SSL_HEADER https://docs.djangoproject.com/en/2.2/ref/settings/#secure-proxy-ssl-header
#SECURE_PROXY_SSL_HEADER=('HTTP_X_FORWARDED_PROTO', 'https')
# Media root is the place in file system where Django and, by extension
# smbackend stores "uploaded" files. This means any and all files
# that are inputted through importers or API
# Django setting: MEDIA_ROOT https://docs.djangoproject.com/en/2.2/ref/settings/#media-root
#MEDIA_ROOT=/home/smbackend/media
# Static root is the place where smbackend will install any static
# files that need to be served to clients. For smbackend this is mostly
# JS and CSS for the API exploration interface + admin
# Django setting: STATIC_ROOT https://docs.djangoproject.com/en/2.2/ref/settings/#static-root
#STATIC_ROOT=/home/smbackend/static
# If set docker will create a superuser, the user can be used to
# access the admin page from where importers can be run.
# DJANGO_SUPERUSER_PASSWORD=*****
# DJANGO_SUPERUSER_USERNAME=admin
# Media URL is address (URL) where users can access files in MEDIA_ROOT
# through http. Ie. where your uploaded files are publicly accessible.
# In the simple case this is a relative URL to same server as API
# Django setting: MEDIA_URL https://docs.djangoproject.com/en/2.2/ref/settings/#media-url
MEDIA_URL=/media/
# Static URL is address (URL) where users can access files in STATIC_ROOT
# through http. Same factors apply as to MEDIA_URL
# Django setting: STATIC_URL https://docs.djangoproject.com/en/1.11/ref/settings/#static-url
STATIC_URL=/static/
# Servicemap backend can pass feedback to a Open311 compliant API.
# You need to configure URL pointing to the Open311 service request
# endpoint (https://wiki.open311.org/GeoReport_v2/#post-service-request
# Additionally you will need to specify two API-keys. One for feedback
# specific to unit and another for general feedback. The implementation
# is rather specific to City of Helsinki.
# OPEN311_URL_BASE=https://asiointi.hel.fi/palautews/rest/v1/requests.json
# OPEN311_API_KEY=12345678
# OPEN311_INTERNAL_API_KEY=12345678
# Sentry is an error tracking sentry (sentry.io) that can be self hosted
# or purchased as PaaS. SENTRY_DSN setting specifies the URL where reports
# for this smbackend instance should be sent. You can find this in
# your Sentry interface (or through its API)
#SENTRY_DSN=http://your.sentry.here/fsdafads/13
# Sentry environment is an optional tag that can be included in sentry
# reports. It is used to separate deployments within Sentry UI
SENTRY_ENVIRONMENT=local-development-unconfigured
# Celery, using default Redis broker url Replace with a custom
# credentials and vhost if they are configured.
# Use redis as hostname when application is started with Docker.
CELERY_BROKER_URL=redis://localhost:6379/0
# Cache location, e.g. redis on localhost using default port and database 0
CACHE_LOCATION=redis://localhost:6379/0
# Email settings
EMAIL_BACKEND=django.core.mail.backends.smtp.EmailBackend
EMAIL_HOST=smtp.example.com
EMAIL_PORT=25
EMAIL_USE_TLS=True
# Django project log level
DJANGO_LOG_LEVEL=INFO
# Turku services importers log level
TURKU_SERVICES_IMPORT_LOG_LEVEL=INFO
# Search log level
SEARCH_LOG_LEVEL=INFO
# IoT APP,
IOT_LOG_LEVEL=INFO
# Eco counter
ECO_COUNTER_LOG_LEVEL=INFO
# Mobility data (includes importers)
MOBILITY_DATA_LOG_LEVEL=INFO
# Bicycle networks APP
BICYCLE_NETWORK_LOG_LEVEL=INFO
# Street maintenance
STREET_MAINTENANCE_LOG_LEVEL=INFO
# Settings needed for enabling Turku area:
#ADDITIONAL_INSTALLED_APPS=smbackend_turku,ptv
#TURKU_API_KEY=secret
#ACCESSIBILITY_SYSTEM_ID=secret
# The location of geo_search addresss endpoint.
GEO_SEARCH_LOCATION=https://paikkatietohaku.api.hel.fi/v1/address
# The Api-Key passed in the authorization header when accessing the geo-search
# production server.
GEO_SEARCH_API_KEY=
# This is a offset value that the ptv importer uses
# the value will be added to the imported Units ID.
PTV_ID_OFFSET=10000000
# Mobile view specific settings.
TURKU_WFS_URL=https://opaskartta.turku.fi/TeklaOGCWeb/WFS.ashx
ECO_COUNTER_STATIONS_URL=https://dev.turku.fi/datasets/ecocounter/liikennelaskimet.geojson
ECO_COUNTER_OBSERVATIONS_URL=https://data.turku.fi/cjtv3brqr7gectdv7rfttc/counters-15min.csv
TRAFFIC_COUNTER_OBSERVATIONS_BASE_URL=https://data.turku.fi/2yxpk2imqi2mzxpa6e6knq/
LAM_COUNTER_STATIONS_URL=https://tie.digitraffic.fi/api/v3/metadata/tms-stations
LAM_COUNTER_API_BASE_URL=https://tie-lam-test.digitraffic.fi
MOBILITY_DATA_CHARGING_STATIONS_URL=https://services1.arcgis.com/rhs5fjYxdOG1Et61/ArcGIS/rest/services/GasFillingStations/FeatureServer/0/query?f=json&where=1%3D1&outFields=OPERATOR%2CLAT%2CLON%2CSTATION_NAME%2CADDRESS%2CCITY%2CZIP_CODE%2CLNG_CNG%2CObjectId
MOBILITY_DATA_GAS_FILLING_STATIONS_URL=https://services1.arcgis.com/rhs5fjYxdOG1Et61/ArcGIS/rest/services/ChargingStations/FeatureServer/0/query?f=json&where=1%20%3D%201%20OR%201%20%3D%201&returnGeometry=true&spatialRel=esriSpatialRelIntersects&outFields=LOCATION_ID%2CNAME%2CADDRESS%2CURL%2COBJECTID%2CTYPE
MOBILITY_DATA_GEOMETRY_URL=https://tie.digitraffic.fi/api/v3/data/traffic-messages/area-geometries?id=11&lastUpdated=false
# Environment variables required for importing street maintenance history.
YIT_SCOPE=
YIT_CLIENT_ID=
YIT_CLIENT_SECRET=
YIT_EVENTS_URL=https://api.autori.io/api/dailymaintenance-a3/route/types/operation/
YIT_ROUTES_URL=https://api.autori.io/api/dailymaintenance-a3/route/
YIT_VEHICLES_URL=https://api.autori.io/api/dailymaintenance-a3/route/types/vehicle/
YIT_CONTRACTS_URL=https://api.autori.io/api/dailymaintenance-a3/contracts/
YIT_TOKEN_URL=https://login.microsoftonline.com/86792d09-0d81-4899-8d66-95dfc96c8014/oauth2/v2.0/token?Scope=api://7f45c30e-cc67-4a93-85f1-0149b44c1cdf/.default
# API key to the Kuntec API
KUNTEC_KEY=
# Telraam API token, required when fetching Telraam data to csv (import_telraam_to_csv.py)
# https://telraam.helpspace-docs.io/article/27/you-wish-more-data-and-statistics-telraam-api
TELRAAM_TOKEN=