commit ebd8d5b1fd55c7bfa359f80b58e56cdda3644723
parent 105177923aaeb75b2f9a570424392b4344862b78
Author: ms <ms@taler.net>
Date: Thu, 12 May 2022 08:45:24 +0200
read file from host
Diffstat:
2 files changed, 9 insertions(+), 6 deletions(-)
diff --git a/typescript/README b/typescript/README
@@ -4,6 +4,9 @@ Building and running the image.
$ podman build -t $tag .
After the build, run:
-$ podman run -it $tag
+$ podman run [-it] [-v /host/path/to/config-file:/config.ts] $tag
-If no errors occur, login as 'root' (p: 'taler').
+The "[-it]" part makes it interactive, although it won't
+be possible to kill the container only with CTRL-C. If "-v"
+is given, the contained application will read 'config-file'
+and configure/launch Taler according to it.
diff --git a/typescript/container/taler-config.js b/typescript/container/taler-config.js
@@ -1,10 +1,10 @@
#!/usr/bin/nodejs
-/*try {
+var fs = require("fs")
+
+try {
const data = fs.readFileSync("/config.ts", "utf-8");
+ console.log(data);
} catch (error) {
console.log(error);
}
-console.log(data)*/
-
-console.log("I'm startled.")