added aliases for pmls / pmlsa
added basic rtl container (not configured yet)
This commit is contained in:
parent
eb66313924
commit
36a67e91c0
3
hosts
3
hosts
@ -22,7 +22,7 @@ zerotier_network=
|
||||
|
||||
[n0xb0x:vars]
|
||||
hostname=n0xb0x
|
||||
app_list=['bitcoin.yml','electrs.yml','clightning.yml','docs.yml']
|
||||
app_list=['bitcoin.yml','electrs.yml','clightning.yml','rtl.yml', 'docs.yml']
|
||||
ansible_user=n0xb0x
|
||||
ansible_password=n0xb0x
|
||||
#registry_url=git.boxxy.net/b0xxer/
|
||||
@ -36,6 +36,7 @@ bitcoin_rpcuser=n0xb0x
|
||||
bitcoin_rpcpassword=8BaOf-luoLM-5zA8V0ozLOtqzZZch2knK9gWIBfafDw
|
||||
bitcoin_rpcauth=n0xb0x:413f1f82906117464e662853bce33577$80a039d800184a1cffd1de5468b5b2a7442ab1d368a13782e5283e575a9f57b2
|
||||
electrs_version=0.10.2
|
||||
rtl_version=0.15.0
|
||||
zerotier_network=
|
||||
#Update wariness - 1 = very reluctant to update, 0 = eager to update
|
||||
#timezone - which timezone update schedule is in
|
||||
|
||||
@ -22,6 +22,11 @@
|
||||
chdir: ~/Containers/clightning
|
||||
cmd: ./build.sh
|
||||
|
||||
- name: rebuild_rtl
|
||||
ansible.builtin.shell:
|
||||
chdir: ~/Containers/rtl
|
||||
cmd: ./build.sh
|
||||
|
||||
- name: rebuild_docs
|
||||
ansible.builtin.shell:
|
||||
chdir: ~/Containers/docs
|
||||
|
||||
@ -57,6 +57,7 @@
|
||||
- "8333:8333"
|
||||
- "9735:9735"
|
||||
- "3010:3010"
|
||||
- "3000:3000"
|
||||
tags: [apps,bitcoin]
|
||||
|
||||
- name: bitcoin - Create bitcoin data / conf directory
|
||||
|
||||
@ -8,4 +8,5 @@
|
||||
file: "{{ item }}"
|
||||
with_items:
|
||||
- "{{ app_list }}"
|
||||
tags: apps
|
||||
|
||||
|
||||
31
roles/apps/tasks/rtl.yml
Normal file
31
roles/apps/tasks/rtl.yml
Normal file
@ -0,0 +1,31 @@
|
||||
|
||||
- name: rtl - Create Containers/rtl Dir
|
||||
ansible.builtin.file:
|
||||
path: ~/Containers/rtl
|
||||
recurse: true
|
||||
state: directory
|
||||
notify: rebuild_rtl
|
||||
tags: [apps,rtl]
|
||||
|
||||
- name: rtl - Copy Containerfile Template
|
||||
ansible.builtin.template:
|
||||
src: rtl/Containerfile.j2
|
||||
dest: ~/Containers/rtl/Containerfile
|
||||
notify: rebuild_rtl
|
||||
tags: [apps,rtl]
|
||||
|
||||
- name: rtl - Copy Containerfile build.sh
|
||||
ansible.builtin.template:
|
||||
src: rtl/build.sh.j2
|
||||
dest: ~/Containers/rtl/build.sh
|
||||
mode: '0700'
|
||||
notify: rebuild_rtl
|
||||
tags: [apps,rtl]
|
||||
|
||||
- name: rtl - Copy rtl-node.container file
|
||||
ansible.builtin.template:
|
||||
src: rtl/rtl-node.container.j2
|
||||
dest: /home/{{ ansible_user }}/.config/containers/systemd/rtl-node.container
|
||||
notify: reload_systemctl
|
||||
tags: [apps,rtl]
|
||||
|
||||
@ -1,5 +1,6 @@
|
||||
[Unit]
|
||||
Description=Bitcoin Node
|
||||
Before=electrs-node.service clightning-node.service rtl-node.service
|
||||
|
||||
[Container]
|
||||
# Use the centos image
|
||||
|
||||
@ -2,19 +2,18 @@
|
||||
# ---------------
|
||||
FROM docker.io/almalinux/9-base as builder
|
||||
|
||||
RUN dnf update -y && dnf module -y enable nodejs:18 && dnf install -y nodejs
|
||||
|
||||
WORKDIR /RTL
|
||||
|
||||
COPY package.json /RTL/package.json
|
||||
COPY package-lock.json /RTL/package-lock.json
|
||||
|
||||
RUN npm install
|
||||
RUN dnf update -y \
|
||||
&& dnf module -y enable nodejs:18 \
|
||||
&& dnf install -y nodejs git \
|
||||
&& git clone https://github.com/Ride-The-Lightning/RTL.git . \
|
||||
&& git checkout tags/v0.15.0 \
|
||||
&& npm install
|
||||
|
||||
# ---------------
|
||||
# Build App
|
||||
# ---------------
|
||||
COPY . .
|
||||
|
||||
# Build the Angular application
|
||||
RUN npm run buildfrontend
|
||||
@ -28,9 +27,13 @@ RUN npm prune --production
|
||||
# ---------------
|
||||
# Release App
|
||||
# ---------------
|
||||
FROM docker.io/almalinux/9-init as runner
|
||||
FROM docker.io/almalinux/9-init
|
||||
|
||||
RUN dnf update -y && dnf module -y enable nodejs:18 && dnf install -y nodejs && dnf clean all && rm -fr /tmp/*
|
||||
RUN dnf update -y \
|
||||
&& dnf module -y enable nodejs:18 \
|
||||
&& dnf install -y nodejs \
|
||||
&& dnf clean all \
|
||||
&& rm -fr /tmp/*
|
||||
|
||||
WORKDIR /RTL
|
||||
|
||||
@ -42,6 +45,4 @@ COPY --from=builder /RTL/node_modules/ ./node_modules
|
||||
|
||||
EXPOSE 3000
|
||||
|
||||
#ENTRYPOINT ["/sbin/init", "-g", "--"]
|
||||
|
||||
CMD ["node", "rtl"]
|
||||
6
roles/apps/templates/rtl/build.sh.j2
Normal file
6
roles/apps/templates/rtl/build.sh.j2
Normal file
@ -0,0 +1,6 @@
|
||||
#!/bin/sh
|
||||
|
||||
#Build command to make container
|
||||
VER={{rtl_version}}
|
||||
|
||||
buildah build -t rtl:$VER -f Containerfile
|
||||
20
roles/apps/templates/rtl/rtl-node.container.j2
Normal file
20
roles/apps/templates/rtl/rtl-node.container.j2
Normal file
@ -0,0 +1,20 @@
|
||||
[Unit]
|
||||
Description=RTL Web App
|
||||
|
||||
[Container]
|
||||
Image={{ registry_url }}/rtl:{{ rtl_version }}
|
||||
PodmanArgs=--pod bitcoin-pod
|
||||
|
||||
# Use volume
|
||||
|
||||
[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
|
||||
@ -6,6 +6,8 @@
|
||||
- name: Determine OS variant
|
||||
register: variant
|
||||
ansible.builtin.shell: grep VARIANT_ID /etc/os-release | sed 's/VARIANT_ID=//g'
|
||||
tags: config
|
||||
|
||||
- name: Create /etc/sysusers.d directory
|
||||
become: true
|
||||
become_method: sudo
|
||||
@ -136,4 +138,14 @@
|
||||
length_minutes = {{ update_schedule_length }}
|
||||
tags: config
|
||||
|
||||
- name: Create pmls / pmlsa alias
|
||||
ansible.builtin.blockinfile:
|
||||
path: ~/.bashrc
|
||||
block: |
|
||||
alias pmls="podman ps --format {% raw %}'{{.Names}} \t{{.Status}}'{% endraw %}"
|
||||
alias pmls="podman ps -a --format {% raw %}'{{.Names}} \t{{.Status}}'{% endraw %}"
|
||||
state: present
|
||||
create: true
|
||||
tags: config
|
||||
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user