[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[taler-deployment] branch master updated: TypeScript Sandbox.
From: |
gnunet |
Subject: |
[taler-deployment] branch master updated: TypeScript Sandbox. |
Date: |
Fri, 27 May 2022 15:04:45 +0200 |
This is an automated email from the git hooks/post-receive script.
ms pushed a commit to branch master
in repository deployment.
The following commit(s) were added to refs/heads/master by this push:
new f09ed4a TypeScript Sandbox.
f09ed4a is described below
commit f09ed4aedbc7ab30588ab3f91ef4db5b13960bca
Author: ms <ms@taler.net>
AuthorDate: Fri May 27 15:02:41 2022 +0200
TypeScript Sandbox.
Compile and run source passed at runtime.
---
typescript/README | 9 +++------
typescript/container/Dockerfile | 7 +++++--
typescript/container/prepare.sh | 2 +-
typescript/container/taler-config.js | 10 ----------
typescript/container/taler-config.sh | 6 ++++++
5 files changed, 15 insertions(+), 19 deletions(-)
diff --git a/typescript/README b/typescript/README
index f0a9445..996ec7a 100644
--- a/typescript/README
+++ b/typescript/README
@@ -3,10 +3,7 @@ Building and running the image.
'cd' into 'container/' and run:
$ podman build -t $tag .
-After the build, run:
-$ podman run [-it] [-v /host/path/to/config-file:/config.ts] $tag
+Run it, passing a configuration expression:
+$ podman run -it [-v /host/path/to/config-file:/config.ts] $tag
-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.
+Please, kill running container with 'podman kill'.
diff --git a/typescript/container/Dockerfile b/typescript/container/Dockerfile
index acea926..898aad1 100644
--- a/typescript/container/Dockerfile
+++ b/typescript/container/Dockerfile
@@ -37,7 +37,10 @@ RUN systemctl enable prepare
# taler-config interprets - at runtime - the
# TypeScript code that describes the deployment.
-COPY taler-config.js .
-RUN chmod +x taler-config.js
+COPY taler-config.sh .
+RUN chmod +x taler-config.sh
+
+# NOTE: should TS be installed from APT?
+RUN npm install -g typescript
CMD ["/sbin/init"]
diff --git a/typescript/container/prepare.sh b/typescript/container/prepare.sh
index e6b356a..7be811e 100644
--- a/typescript/container/prepare.sh
+++ b/typescript/container/prepare.sh
@@ -4,4 +4,4 @@ set -e
su -c "createuser --superuser root && createdb taler" postgres
-/taler-config.js
+/taler-config.sh
diff --git a/typescript/container/taler-config.js
b/typescript/container/taler-config.js
deleted file mode 100755
index 4d01bf8..0000000
--- a/typescript/container/taler-config.js
+++ /dev/null
@@ -1,10 +0,0 @@
-#!/usr/bin/nodejs
-
-var fs = require("fs")
-
-try {
- const data = fs.readFileSync("/config.ts", "utf-8");
- console.log(data);
-} catch (error) {
- console.log(error);
-}
diff --git a/typescript/container/taler-config.sh
b/typescript/container/taler-config.sh
new file mode 100755
index 0000000..3e17148
--- /dev/null
+++ b/typescript/container/taler-config.sh
@@ -0,0 +1,6 @@
+#!/bin/bash
+
+set -eu
+
+tsc /config.ts
+node /config.js
--
To stop receiving notification emails like this one, please contact
gnunet@gnunet.org.
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [taler-deployment] branch master updated: TypeScript Sandbox.,
gnunet <=