-
-
Notifications
You must be signed in to change notification settings - Fork 26
Expand file tree
/
Copy pathentrypoint.py
More file actions
19 lines (15 loc) · 682 Bytes
/
Copy pathentrypoint.py
File metadata and controls
19 lines (15 loc) · 682 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
import os
import json
import sys
# Create runtime configuration file for frontend at runtime
config_dir = "/container/backend/image_converter/presentation/web/static_site/config"
os.makedirs(config_dir, exist_ok=True)
runtime_config = {
"DISABLE_LOGO": os.environ.get("DISABLE_LOGO", "false"),
"DISABLE_STORAGE_MANAGEMENT": os.environ.get("DISABLE_STORAGE_MANAGEMENT", "false"),
"DEV_MODE": os.environ.get("DEV_MODE", "false"),
}
with open(os.path.join(config_dir, "runtime.json"), "w", encoding="utf-8") as f:
json.dump(runtime_config, f)
# Execute the main application
os.execvp("python", ["python", "-m", "backend.image_converter.bootstraper"] + sys.argv[1:])