Skip to content

armgit / zed

Public Imported from GitHub
0

Code at the speed of thought – Zed is a high-performance, multiplayer code editor from the creators of Atom and Tree-sitter.

Get pgadmin loading the passfile

Max Brunsfeldc4a5caa58731
diff --git a/crates/collab/k8s/manifest.template.yml b/crates/collab/k8s/manifest.template.yml
index 5af1aad450f..2ed9333841e 100644
--- a/crates/collab/k8s/manifest.template.yml
+++ b/crates/collab/k8s/manifest.template.yml
@@ -182,6 +182,8 @@ spec:
- |
set -e
+ mkdir -p /var/lib/pgadmin/storage/max_zed.dev
+
python3 - <<EOF
import os
import json
@@ -200,15 +202,15 @@ spec:
"Username": url.username,
"Host": url.hostname,
"SSLMode": "require",
- "PassFile": "/pgadmin4/passfile",
+ "PassFile": "/passfile",
"MaintenanceDB": db,
}
}
}))
- with open("/pgadmin4/passfile", "w") as f:
- f.write(f"{url.hostname}:{url.port}:*:{url.username}:{url.password}\n")
- os.chmod("/pgadmin4/passfile", 0o600)
+ with open("/var/lib/pgadmin/storage/max_zed.dev/passfile", "w") as f:
+ f.write(f"*:*:*:*:{url.password}")
+ os.chmod("/var/lib/pgadmin/storage/max_zed.dev/passfile", 0o600)
EOF
exec /entrypoint.sh