chore(deployment): Deployment using logos core (#3084)

This commit is contained in:
gusto 2026-07-06 20:32:49 +03:00 committed by GitHub
parent 5542c9d27a
commit 899660ab7f
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
3 changed files with 58 additions and 8 deletions

View File

@ -2,21 +2,34 @@
# check=skip=SecretsUsedInArgOrEnv
# Ignore warnings about sensitive information as this is test data.
ARG LB_NODE_VERSION=0.1.3
ARG CORE_VERSION=0.2.0
ARG NODE_VERSION=0.2.0
# ===========================
# BUILD IMAGE
# ===========================
FROM alpine:latest AS builder
FROM debian:trixie-slim AS builder
ARG LB_NODE_VERSION
ARG CORE_VERSION
ARG NODE_VERSION
WORKDIR /logos-blockchain
COPY . .
RUN apk add --no-cache curl bash
RUN scripts/setup-logos-blockchain-node.sh "$LB_NODE_VERSION" "linux-$(uname -m)"
RUN apt-get update && apt-get install -y --no-install-recommends \
curl \
ca-certificates \
&& rm -rf /var/lib/apt/lists/*
RUN scripts/setup-logos-core.sh "$CORE_VERSION" "$(uname -m)-linux"
RUN ./lgpd --appimage-extract && mv squashfs-root ext-lgpd && \
./lgpm --appimage-extract && mv squashfs-root ext-lgpm && \
./logoscore --appimage-extract && mv squashfs-root ext-logoscore
RUN ./ext-lgpd/AppRun download blockchain_module --version "$NODE_VERSION" --output ./ && \
./ext-lgpm/AppRun --modules-dir ./modules install --file "blockchain_module-${NODE_VERSION}.lgx"
# ===========================
# NODE IMAGE
@ -33,8 +46,9 @@ LABEL maintainer="augustinas@status.im" \
RUN apt-get update && apt-get install -y --no-install-recommends curl yq && \
rm -rf /var/lib/apt/lists/*
COPY --from=builder /usr/local/bin/logos-blockchain-node /usr/local/bin/logos-blockchain-node
COPY --from=builder /logos-blockchain/ext-logoscore /opt/logoscore
COPY --from=builder /logos-blockchain/modules /opt/modules
EXPOSE 3000 8080 9000 60000
ENTRYPOINT ["logos-blockchain-node"]
ENTRYPOINT ["logoscore"]

View File

@ -9,4 +9,14 @@ export CFG_FILE_PATH="/node-data/${LB_HOST_IDX}/user_config.yaml" \
LOG_BACKEND="file" \
LOG_DIR="/node-data/${LB_HOST_IDX}/"
exec /usr/local/bin/logos-blockchain-node --deployment $CFG_DEPLOYMENT_PATH $CFG_FILE_PATH
(
until /opt/logoscore/AppRun load-module blockchain_module > /dev/null 2>&1; do
sleep 2
done
/opt/logoscore/AppRun call blockchain_module start "$CFG_FILE_PATH" "$CFG_DEPLOYMENT_PATH"
echo "Logos Blockchain Module started."
) &
exec /opt/logoscore/AppRun -m /opt/modules -D

26
scripts/setup-logos-core.sh Executable file
View File

@ -0,0 +1,26 @@
#!/bin/bash
set -e
VERSION="${1:-0.2.0}"
PLATFORM="${2:-x86_64-linux}"
curl -L -O "https://github.com/logos-co/logos-logoscore-cli/releases/download/${VERSION}/logoscore-${PLATFORM}.tar.gz"
curl -L -O "https://github.com/logos-co/logos-package-manager/releases/download/${VERSION}/lgpm-${PLATFORM}.tar.gz"
curl -L -O "https://github.com/logos-co/logos-package-downloader/releases/download/${VERSION}/lgpd-${PLATFORM}.tar.gz"
tar -xvf logoscore-${PLATFORM}.tar.gz
tar -xvf lgpm-${PLATFORM}.tar.gz
tar -xvf lgpd-${PLATFORM}.tar.gz
rm logoscore-${PLATFORM}.tar.gz
rm lgpm-${PLATFORM}.tar.gz
rm lgpd-${PLATFORM}.tar.gz
mv logoscore-${ARCH}* logoscore
mv lgpm-${ARCH}* lgpm
mv lgpd-${ARCH}* lgpd
chmod +x logoscore lgpm lgpd
echo "Success! logoscore, lgpm and lgpd downloaded."