We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 60da48d commit 9dbae8fCopy full SHA for 9dbae8f
1 file changed
dvconfig.py.sample
@@ -1,6 +1,13 @@
1
import os
2
3
-base_url = os.getenv('BASE_URL', 'http://localhost:8080')
+# Create the base_url from different parts (very usefull on K8s) or just
4
+# read completely from a single env var. Default to "http://localhost:8080"
5
+host = os.getenv('DATAVERSE_SERVICE_HOST', 'localhost')
6
+port = os.getenv('DATAVERSE_SERVICE_PORT_HTTP', '8080')
7
+proto = os.getenv('DATAVERSE_SERVICE_PORT_PROTO', 'http')
8
+subpath = os.getenv('DATAVERSE_SERVICE_SUBPATH', '')
9
+base_url = os.getenv('BASE_URL', proto+'://'+host+':'+port+subpath)
10
+
11
api_token = os.getenv('API_TOKEN', '')
12
13
# sample data will be created in the following order
0 commit comments