Initial version of electrs - not working
This commit is contained in:
parent
c93df6d0d3
commit
7cd72b6f87
3
hosts
3
hosts
@ -22,7 +22,7 @@ zerotier_network=
|
||||
|
||||
[n0xb0x:vars]
|
||||
hostname=n0xb0x
|
||||
app_list=['bitcoin.yml','docs.yml']
|
||||
app_list=['bitcoin.yml','electrs.yml','docs.yml']
|
||||
ansible_user=n0xb0x
|
||||
ansible_password=n0xb0x
|
||||
#registry_url=git.boxxy.net/b0xxer/
|
||||
@ -31,6 +31,7 @@ registry_user=
|
||||
registry_pass=
|
||||
bitcoin_version=26.0
|
||||
bitcoin_rpcpassword=rVhfmriXjB8uFekmn7sLvnUiY610JaOx
|
||||
electrs_version=0.10.2
|
||||
zerotier_network=
|
||||
|
||||
|
||||
|
||||
@ -6,6 +6,11 @@
|
||||
chdir: ~/Containers/bitcoin
|
||||
cmd: ./build.sh
|
||||
|
||||
- name: rebuild_electrs
|
||||
ansible.builtin.shell:
|
||||
chdir: ~/Containers/electrs
|
||||
cmd: ./build.sh
|
||||
|
||||
- name: rebuild_docs
|
||||
ansible.builtin.shell:
|
||||
chdir: ~/Containers/docs
|
||||
|
||||
30
roles/apps/tasks/electrs.yml
Normal file
30
roles/apps/tasks/electrs.yml
Normal file
@ -0,0 +1,30 @@
|
||||
---
|
||||
# tasks file for build
|
||||
#
|
||||
- name: electrs - Copy electrs-node.container file
|
||||
ansible.builtin.template:
|
||||
src: electrs/electrs-node.container.j2
|
||||
dest: /home/{{ ansible_user }}/.config/containers/systemd/electrs-node.container
|
||||
notify: reload_systemctl
|
||||
|
||||
- name: electrs - Create Containers/bitcoin Dir
|
||||
ansible.builtin.file:
|
||||
path: ~/Containers/electrs
|
||||
recurse: true
|
||||
state: directory
|
||||
notify: rebuild_electrs
|
||||
|
||||
- name: electrs - Copy Containerfile Template
|
||||
ansible.builtin.template:
|
||||
src: electrs/Containerfile.j2
|
||||
dest: ~/Containers/electrs/Containerfile
|
||||
notify: rebuild_electrs
|
||||
|
||||
- name: electrs - Copy build script
|
||||
ansible.builtin.template:
|
||||
src: electrs/build.sh.j2
|
||||
dest: ~/Containers/electrs/build.sh
|
||||
mode: '0700'
|
||||
notify: rebuild_electrs
|
||||
|
||||
|
||||
@ -2,9 +2,9 @@
|
||||
|
||||
#FROM rust:1.44.1-slim-buster AS builder
|
||||
|
||||
FROM almalinux/9-base as builder
|
||||
FROM docker.io/almalinux/9-base:latest as builder
|
||||
|
||||
ARG VERSION=v0.10.2
|
||||
ARG VERSION=v{{ electrs_version }}
|
||||
ENV REPO=https://github.com/romanz/electrs.git
|
||||
|
||||
WORKDIR /build
|
||||
@ -19,7 +19,7 @@ RUN cargo build --release --bin electrs
|
||||
|
||||
#FROM debian:buster-slim
|
||||
|
||||
FROM almalinux/9-minimal
|
||||
FROM docker.io/almalinux/9-minimal:latest
|
||||
|
||||
RUN microdnf update -y && microdnf clean all
|
||||
|
||||
@ -1,6 +1,6 @@
|
||||
#!/bin/sh
|
||||
|
||||
#Build command to make container
|
||||
VER=0.10.2
|
||||
VER={{electrs_version}}
|
||||
|
||||
buildah build -t electrs:$VER --build-arg VERSION=v$VER -f Containerfile
|
||||
21
roles/apps/templates/electrs/electrs-node.container.j2
Normal file
21
roles/apps/templates/electrs/electrs-node.container.j2
Normal file
@ -0,0 +1,21 @@
|
||||
[Unit]
|
||||
Description=Electrs Server
|
||||
|
||||
[Container]
|
||||
Image={{ registry_url }}/electrs:{{ electrs_version }}
|
||||
PodmanArgs=--pod bitcoin-pod
|
||||
|
||||
# Use volume
|
||||
Volume=/home/{{ansible_user}}/.bitcoin:/bitcoin/.bitcoin: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
|
||||
Loading…
x
Reference in New Issue
Block a user