added aliases for pmls / pmlsa
added basic rtl container (not configured yet)
This commit is contained 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
|
||||
|
||||
|
||||
@@ -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
|
||||
|
||||
+12
-11
@@ -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"]
|
||||
@@ -0,0 +1,6 @@
|
||||
#!/bin/sh
|
||||
|
||||
#Build command to make container
|
||||
VER={{rtl_version}}
|
||||
|
||||
buildah build -t rtl:$VER -f Containerfile
|
||||
@@ -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
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user