diff --git a/Dockerfile.alpine-musl b/Dockerfile.alpine-musl index b286daf..51f2d82 100644 --- a/Dockerfile.alpine-musl +++ b/Dockerfile.alpine-musl @@ -31,6 +31,7 @@ RUN apk add --no-cache \ linux-headers \ wget \ bash \ + openssh-client \ nghttp2-dev \ nghttp2-static \ c-ares-dev \ @@ -58,17 +59,14 @@ RUN cd /tmp && \ make install && \ rm -rf /tmp/secp256k1 -# Copy only submodule configuration and git directory -COPY .gitmodules /build/.gitmodules -COPY .git /build/.git +# Fetch nostr_core_lib source directly over HTTPS. +# This avoids relying on local git metadata/submodule state in the Docker build context. +ARG NOSTR_CORE_LIB_REF=2e7eacc02eef0ccf261f655330dc6a43d6cebdfb +RUN git clone https://git.laantungir.net/laantungir/nostr_core_lib.git /build/nostr_core_lib && \ + cd /build/nostr_core_lib && \ + git checkout "$NOSTR_CORE_LIB_REF" -# Initialize submodules (cached unless .gitmodules changes) -RUN git submodule update --init --recursive - -# Copy nostr_core_lib source files (cached unless nostr_core_lib changes) -COPY nostr_core_lib /build/nostr_core_lib/ - -# Build nostr_core_lib with required NIPs (cached unless nostr_core_lib changes) +# Build nostr_core_lib with required NIPs (cached unless submodule changes) # Disable fortification in build.sh to prevent __*_chk symbol issues # NIPs: 001(Basic), 006(Keys), 013(PoW), 017(DMs), 019(Bech32), 042(Auth), 044(Encryption), 059(Gift Wrap) RUN cd nostr_core_lib && \ @@ -82,17 +80,14 @@ RUN cd nostr_core_lib && \ COPY api/ /build/api/ COPY scripts/embed_web_files.sh /build/scripts/ -# Create src directory and embed web files into C headers -RUN mkdir -p src && \ - chmod +x scripts/embed_web_files.sh && \ - ./scripts/embed_web_files.sh - -# Copy Ginxsom source files LAST (only this layer rebuilds on source changes) -# Note: The embedded header from previous step will be overwritten by this COPY -# So we need to ensure src/admin_interface_embedded.h is NOT in src/ directory +# Copy Ginxsom source files COPY src/ /build/src/ COPY include/ /build/include/ +# Embed web files AFTER source copy so src/admin_interface_embedded.h is always fresh +RUN chmod +x scripts/embed_web_files.sh && \ + ./scripts/embed_web_files.sh + # Build Ginxsom with full static linking (only rebuilds when src/ changes) # Disable fortification to avoid __*_chk symbols that don't exist in MUSL # Use conditional compilation flags based on DEBUG_BUILD argument diff --git a/Trash/[builder b/Trash/[builder new file mode 100644 index 0000000..e69de29 diff --git a/api/index.css b/api/index.css index 4c4ae61..996b508 100644 --- a/api/index.css +++ b/api/index.css @@ -1308,3 +1308,158 @@ body.dark-mode .sql-results-table tbody tr:nth-child(even) { font-size: 12px; } +/* ================================ + BLOB BROWSER + ================================ */ + +.blob-browser-controls { + gap: 8px; + flex-wrap: wrap; +} + +.blob-browser-controls button { + min-width: 160px; +} + +.blob-pagination-controls { + gap: 8px; +} + +.blob-pagination-controls button { + min-width: 120px; +} + +.blob-grid-view { + display: grid; + grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); + gap: 12px; + margin: 12px 0; +} + +.blob-card { + border: 1px solid var(--border-color); + border-radius: var(--border-radius); + padding: 10px; + background: var(--secondary-color); +} + +.blob-thumb-link { + display: block; + width: 100%; + height: 140px; + border: 1px solid var(--muted-color); + border-radius: 4px; + overflow: hidden; + text-decoration: none; + margin-bottom: 8px; +} + +.blob-thumb { + width: 100%; + height: 100%; + object-fit: cover; + display: block; +} + +.blob-thumb-placeholder { + width: 100%; + height: 100%; + display: flex; + align-items: center; + justify-content: center; + background: var(--muted-color); + color: var(--primary-color); + font-size: 12px; + text-align: center; + padding: 8px; +} + +.blob-card-meta { + font-size: 12px; + line-height: 1.35; + word-break: break-word; +} + +.blob-hash-link { + color: var(--primary-color); + text-decoration: none; +} + +.blob-hash-link:hover { + color: var(--accent-color); +} + +.blob-list-preview { + width: 58px; + height: 44px; + object-fit: cover; + border: 1px solid var(--muted-color); + border-radius: 4px; + display: block; +} + +.blob-list-placeholder { + width: 58px; + height: 44px; + border: 1px solid var(--muted-color); + border-radius: 4px; + display: flex; + align-items: center; + justify-content: center; + font-size: 10px; + background: var(--muted-color); +} + +.blob-list-view .config-table td { + vertical-align: middle; +} + +.blob-list-view th.blob-sortable-th { + cursor: pointer; + user-select: none; + white-space: nowrap; +} + +.blob-list-view th.blob-sortable-th:hover { + color: var(--accent-color); +} + +.blob-sort-indicator { + display: inline-block; + width: 14px; + text-align: center; + margin-left: 4px; + font-size: 10px; +} + +.blob-delete-btn { + min-width: 86px; + font-size: 10px; + padding: 6px 8px; + border: 1px solid var(--accent-color); + background: transparent; + color: var(--accent-color); + cursor: pointer; + border-radius: 4px; + font-family: var(--font-family); +} + +.blob-delete-btn:hover { + background: var(--accent-color); + color: var(--secondary-color); +} + +.blob-delete-btn:disabled { + opacity: 0.6; + cursor: not-allowed; +} + +.blob-empty { + border: 1px dashed var(--border-color); + border-radius: var(--border-radius); + padding: 24px; + text-align: center; + font-style: italic; + color: var(--primary-color); +} + diff --git a/api/index.html b/api/index.html index bb31c90..1cb6f60 100644 --- a/api/index.html +++ b/api/index.html @@ -13,6 +13,7 @@