36 lines
945 B
Plaintext
36 lines
945 B
Plaintext
<!DOCTYPE html>
|
|
<html>
|
|
<head>
|
|
<meta charset="utf-8" />
|
|
<meta http-equiv="X-UA-Compatible" content="IE=edge">
|
|
<title>View Secrets</title>
|
|
<meta name="viewport" content="width=device-width, initial-scale=1">
|
|
<link rel="stylesheet" type="text/css" media="screen" href="/main.css" />
|
|
<script src="/main.js"></script>
|
|
</head>
|
|
<body>
|
|
<h1>View environment vars and secret files</h1>
|
|
<p>This little app will show environment variables and files mounted under <code>/secret</code> folder.</p>
|
|
<h2>Secrets</h2>
|
|
<p>List of files and their contents within secrets directory <code><%= secrets_base_dir %></code>:</p>
|
|
<pre>
|
|
<%=
|
|
Dir["#{secrets_base_dir}/**/*"].map do |path|
|
|
if File.directory?(path)
|
|
path + "={directory}"
|
|
else
|
|
path + "=" + File.read(path)
|
|
end
|
|
end.join("\n")
|
|
%>
|
|
</pre>
|
|
<h2>Environment Variables</h2>
|
|
<pre>
|
|
<%=
|
|
ENV.keys.sort.map do |key|
|
|
key + "=" + ENV[key]
|
|
end.join("\n")
|
|
%>
|
|
</pre>
|
|
</body>
|
|
</html> |