bitb0x/roles/apps/templates/clightning/clightning-node.container.j2
2025-04-11 07:38:34 -05:00

24 lines
863 B
Django/Jinja

[Unit]
Description=Core Lightning Server
[Container]
Image={{ registry_url }}/clightning:{{ clightning_version }}
PodmanArgs=--pod bitcoin-pod
Exec=--pid-file=/root/.lightning/lightning.pid --bitcoin-rpcuser={{bitcoin_rpcuser}} --bitcoin-rpcpassword={{bitcoin_rpcpassword}} --clnrest-port=3001 --clnrest-host=0.0.0.0 --clnrest-certs=/root/.lightning
# Use volume
Volume=/home/{{ansible_user}}/vol/bitcoin/.bitcoin:/data/.bitcoin:ro,Z
Volume=/home/{{ansible_user}}/vol/clightning/.lightning:/root/.lightning:Z
[Service]
# Restart service when sleep finishes
Restart=always
# Extend Timeout to allow time to pull the image
TimeoutStartSec=900
# ExecStartPre flag and other systemd commands can go here, see systemd.unit(5) man page.
# ExecStartPre=/usr/share/mincontainer/setup.sh
[Install]
# Start by default on boot
WantedBy=multi-user.target default.target