Page Menu
Home
Phabricator
Search
Configure Global Search
Log In
Files
F3405108
D5274.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Award Token
Flag For Later
Size
1 KB
Referenced Files
None
Subscribers
None
D5274.diff
View Options
diff --git a/nix/dev-shell.nix b/nix/dev-shell.nix
--- a/nix/dev-shell.nix
+++ b/nix/dev-shell.nix
@@ -134,6 +134,9 @@
wait "$mariadb_pid" "$redis_pid"
'' + ''
+ # Render default configuration for keyserver
+ $PRJ_ROOT/scripts/create_url_facts.sh
+
# Provide decent bash prompt
source "${better-prompt}/bin/better-prompt"
diff --git a/scripts/create_url_facts.sh b/scripts/create_url_facts.sh
new file mode 100755
--- /dev/null
+++ b/scripts/create_url_facts.sh
@@ -0,0 +1,21 @@
+#!/usr/bin/env bash
+
+set -euo pipefail
+
+SCRIPT_DIR=$(cd "$(dirname "$0")" || true; pwd -P)
+ROOT_DIR="${SCRIPT_DIR}/.."
+KEYSERVER_FACTS_DIR="${ROOT_DIR}/keyserver/facts"
+COMMAPP_URL_PATH="${KEYSERVER_FACTS_DIR}/commapp_url.json"
+LANDING_URL_PATH="${KEYSERVER_FACTS_DIR}/landing_url.json"
+
+if [[ ! -d "$KEYSERVER_FACTS_DIR" ]]; then
+ mkdir -p "$KEYSERVER_FACTS_DIR"
+fi
+
+if [[ ! -f "$COMMAPP_URL_PATH" ]]; then
+ cp "$SCRIPT_DIR/templates/commapp_url.json" "$COMMAPP_URL_PATH"
+fi
+
+if [[ ! -f "$LANDING_URL_PATH" ]]; then
+ cp "$SCRIPT_DIR/templates/landing_url.json" "$LANDING_URL_PATH"
+fi
diff --git a/scripts/templates/commapp_url.json b/scripts/templates/commapp_url.json
new file mode 100644
--- /dev/null
+++ b/scripts/templates/commapp_url.json
@@ -0,0 +1,7 @@
+{
+ "baseDomain": "http://localhost:3000",
+ "basePath": "/comm/",
+ "baseRoutePath": "/comm/",
+ "https": false,
+ "proxy": "none"
+}
diff --git a/scripts/templates/landing_url.json b/scripts/templates/landing_url.json
new file mode 100644
--- /dev/null
+++ b/scripts/templates/landing_url.json
@@ -0,0 +1,7 @@
+{
+ "baseDomain": "http://localhost:3000",
+ "basePath": "/commlanding/",
+ "baseRoutePath": "/commlanding/",
+ "https": false,
+ "proxy": "none"
+}
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Wed, Dec 4, 6:19 PM (11 h, 33 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
2614577
Default Alt Text
D5274.diff (1 KB)
Attached To
Mode
D5274: [Nix] Auto-generate url json configuration files
Attached
Detach File
Event Timeline
Log In to Comment