[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[taler-deployment] branch master updated: Sandbox.
From: |
gnunet |
Subject: |
[taler-deployment] branch master updated: Sandbox. |
Date: |
Tue, 31 May 2022 10:29:00 +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 fd73de5 Sandbox.
fd73de5 is described below
commit fd73de5cab154e462405c9f850ab0ad65ae12251
Author: ms <ms@taler.net>
AuthorDate: Tue May 31 10:28:26 2022 +0200
Sandbox.
Installing taler-wallet-lib via the wallet-core
build system.
---
typescript/config.ts | 2 ++
typescript/container/Dockerfile | 51 ++++++++++++++++++++----------------
typescript/container/export_path.sh | 3 ---
typescript/container/prepare.service | 1 +
typescript/container/prepare.sh | 0
typescript/container/taler-config.sh | 1 +
6 files changed, 32 insertions(+), 26 deletions(-)
diff --git a/typescript/config.ts b/typescript/config.ts
new file mode 100644
index 0000000..6b5719a
--- /dev/null
+++ b/typescript/config.ts
@@ -0,0 +1,2 @@
+var h = require("@gnu-taler/taler-config-lib");
+h()
diff --git a/typescript/container/Dockerfile b/typescript/container/Dockerfile
index 898aad1..31a71ba 100644
--- a/typescript/container/Dockerfile
+++ b/typescript/container/Dockerfile
@@ -7,40 +7,45 @@ RUN apt-get install -y autoconf autopoint libtool texinfo \
libqrencode-dev zip jq nodejs npm openjdk-17-jre nginx procps curl
RUN pip3 install qrcode click requests jinja2 poetry babel
+# NOTE: taler-local is a _copy_ of the official
+# deployment/bin/taler-local, needed due to problems
+# referencing files outside of the Dockerfile's directory.
+COPY taler-local .
+
# Use taler-local to build from sources for now.
# This step will be optional, offering to install
# from Debian packages.
-
-# NOTE: taler-local is a _copy_ of the official deployment/bin/taler-local,
-# needed due to problems into referencing files outside of the Dockerfile's
-# directory.
-COPY taler-local .
-
RUN python3 /taler-local bootstrap --without-repos wallet-core
-RUN python3 /taler-local build
-
-# To debug. Will be removed.
-RUN echo "root:taler" | chpasswd
-# No need to manually login.
+RUN python3 /taler-local build
+# Setup the PNPM/TypeScript/Node environment.
+RUN npm install -g pnpm
+RUN pnpm config set global-bin-dir /usr/local/bin
+RUN pnpm install -g typescript
+RUN pnpm install --save-dev @types/node
+
+# Disable logins:
RUN systemctl mask console-getty
-# RUN systemctl mask systemd-logind
+RUN systemctl mask systemd-logind
+# This unit file will start along the boot process.
+# It'll create the database, and finally call the config
+# interpreter.
COPY prepare.service /etc/systemd/system
RUN chmod 664 /etc/systemd/system/prepare.service
+RUN systemctl enable prepare
+
+# Install 'taler-config-lib'.
+RUN git clone git://git.taler.net/wallet-core
+RUN cd /wallet-core && ./bootstrap && ./configure && make config-lib
-# prepare.sh creates the database and finally
-# calls the configuration interpreter / generator: taler-config.js.
+# Can be moved up (next to its unit file); here to
+# avoid huge re-buildings. prepare.sh creates the
+# database and finally calls the configuration interpreter
+# / generator: taler-config.js.
COPY prepare.sh .
-COPY export_path.sh /root/.bashrc
-RUN chmod +x prepare.sh
-RUN systemctl enable prepare
-# taler-config interprets - at runtime - the
-# TypeScript code that describes the deployment.
+# Compiles the TypeScript file passed in by the user,
+# sets NODE_PATH, and finally triggers the configuration.
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/export_path.sh
b/typescript/container/export_path.sh
deleted file mode 100644
index 6f41874..0000000
--- a/typescript/container/export_path.sh
+++ /dev/null
@@ -1,3 +0,0 @@
-#!/bin/bash
-
-export PATH=$PATH:$HOME/.local/bin
diff --git a/typescript/container/prepare.service
b/typescript/container/prepare.service
index b35d3da..560be16 100644
--- a/typescript/container/prepare.service
+++ b/typescript/container/prepare.service
@@ -1,5 +1,6 @@
[Unit]
Description=PrepareDatabase
+After=postgresql.service
[Service]
ExecStart=/prepare.sh
diff --git a/typescript/container/prepare.sh b/typescript/container/prepare.sh
old mode 100644
new mode 100755
diff --git a/typescript/container/taler-config.sh
b/typescript/container/taler-config.sh
index 3e17148..74c199a 100755
--- a/typescript/container/taler-config.sh
+++ b/typescript/container/taler-config.sh
@@ -3,4 +3,5 @@
set -eu
tsc /config.ts
+export NODE_PATH=$(pnpm root -g)
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: Sandbox.,
gnunet <=