aboutsummaryrefslogtreecommitdiffstats
path: root/config
diff options
context:
space:
mode:
authorÓscar Nájera <hi@oscarnajera.com>2021-09-23 19:43:35 +0200
committerÓscar Nájera <hi@oscarnajera.com>2021-09-23 19:43:35 +0200
commit8c6fd7803f087b2ccbe579852a7f2fc38a67ba13 (patch)
treeba6e60188d02e003e15e2aabc2711739ff6c653f /config
parentda0a2a5c50f6f805b5ad113dfcfdc71f54d6a1cb (diff)
downloaddotfiles-8c6fd7803f087b2ccbe579852a7f2fc38a67ba13.tar.gz
dotfiles-8c6fd7803f087b2ccbe579852a7f2fc38a67ba13.tar.bz2
dotfiles-8c6fd7803f087b2ccbe579852a7f2fc38a67ba13.zip
Trying out shepherd to manage services
Cardano alonzo purple network and wallet
Diffstat (limited to 'config')
-rw-r--r--config/shepherd/init.d/cardano.scm32
1 files changed, 32 insertions, 0 deletions
diff --git a/config/shepherd/init.d/cardano.scm b/config/shepherd/init.d/cardano.scm
new file mode 100644
index 0000000..4e73046
--- /dev/null
+++ b/config/shepherd/init.d/cardano.scm
@@ -0,0 +1,32 @@
+(let ((config-dir (string-append (getenv "HOME") "/.guix-profile/etc/conf/cardano/"))
+ (db-dir (string-append (getenv "HOME") "/test-cardano/purple/")))
+ (mkdir db-dir)
+ (register-services
+ (make <service>
+ #:docstring "Alonzo Purple test network"
+ #:provides '(alonzo-purple-node)
+ #:start (make-forkexec-constructor
+ (list "cardano-node" "run"
+ "--database-path" db-dir
+ "--socket-path" (string-append db-dir "socket")
+ "--port" "3005"
+ "--config" (string-append config-dir "alonzo-purple-config.json")
+ "--topology" (string-append config-dir "alonzo-purple-topology.json"))
+ #:log-file (string-append db-dir "/log/alonzo.log")
+ )
+ #:stop (make-kill-destructor)
+ #:respawn? #t))
+
+ (register-services
+ (make <service>
+ #:docstring "Alonzo Purple wallet"
+ #:provides '(alonzo-wallet)
+ #:start (make-forkexec-constructor
+ (list (string-append (getenv "HOME") "/.cabal/bin/cardano-wallet")
+ "serve"
+ "--node-socket" (string-append db-dir "socket")
+ "--database" "/home/titan/dev/cardano/cardano-wallet/waldb"
+ "--testnet" (string-append config-dir "alonzo-purple-byron-genesis.json"))
+ #:log-file (string-append db-dir "/log/alonzo-wallet.log"))
+ #:stop (make-kill-destructor)
+ #:requires '(alonzo-purple-node))))