Migrate internal module imports to unified package path.

Replaced legacy `*.orly` module imports with `next.orly.dev/pkg` paths across the codebase for consistency. Removed legacy `go.mod` files from sub-packages, consolidating dependency management. Added Dockerfiles and configurations for benchmarking environments.
This commit is contained in:
2025-09-12 16:12:31 +01:00
parent 2dd119401b
commit 110223fc4e
236 changed files with 4098 additions and 1253 deletions

View File

@@ -0,0 +1,54 @@
FROM ubuntu:22.04 AS builder
ENV DEBIAN_FRONTEND=noninteractive
# Install build dependencies
RUN apt-get update && apt-get install -y git g++ make libssl-dev zlib1g-dev liblmdb-dev libflatbuffers-dev libsecp256k1-dev libzstd-dev \
&& rm -rf /var/lib/apt/lists/*
WORKDIR /build
COPY . .
# Initialize git submodules
RUN git submodule update --init --recursive
# Build strfry
RUN make setup-golpe && \
make -j$(nproc)
FROM ubuntu:22.04
RUN apt-get update && apt-get install -y \
liblmdb0 \
libsecp256k1-0 \
curl \
bash \
&& rm -rf /var/lib/apt/lists/*
WORKDIR /app
COPY --from=builder /build/strfry /app/
COPY --from=builder /build/strfry.conf /app/
# Create the data directory placeholder (may be masked by volume at runtime)
RUN mkdir -p /data && \
chmod 755 /data
# Update strfry.conf to bind to all interfaces and use port 8080
RUN sed -i 's/bind = "127.0.0.1"/bind = "0.0.0.0"/' /app/strfry.conf && \
sed -i 's/port = 7777/port = 8080/' /app/strfry.conf
# Entrypoint ensures the LMDB directory exists inside the mounted volume before starting
ENV STRFRY_DB_PATH=/data/strfry.lmdb
RUN echo '#!/usr/bin/env bash' > /entrypoint.sh && \
echo 'set -euo pipefail' >> /entrypoint.sh && \
echo 'DB_PATH="${STRFRY_DB_PATH:-/data/strfry.lmdb}"' >> /entrypoint.sh && \
echo 'mkdir -p "$DB_PATH"' >> /entrypoint.sh && \
echo 'chown -R root:root "$(dirname "$DB_PATH")"' >> /entrypoint.sh && \
echo 'exec /app/strfry relay' >> /entrypoint.sh && \
chmod +x /entrypoint.sh
EXPOSE 8080
HEALTHCHECK --interval=30s --timeout=10s --start-period=5s --retries=3 \
CMD curl -f http://localhost:8080 || exit 1
ENTRYPOINT ["/entrypoint.sh"]