Преглед на файлове

build(docker): update config for demo website with libsodium support

- Rename binary from spry-website to spry-demo
- Add libsodium-devel build dependency and libsodium runtime dependency
- Clone Invercargill from expressions branch for new features
- Copy demo source files for DemoHostComponent to display in demo viewer
- Set working directory to /app for relative path resolution
- Update meson build to use local libsodium vapi file declaration
Billy Barrow преди 6 дни
родител
ревизия
a8f88043f3
променени са 3 файла, в които са добавени 18 реда и са изтрити 11 реда
  1. 0 3
      .dockerignore
  2. 15 6
      Dockerfile
  3. 3 2
      meson.build

+ 0 - 3
.dockerignore

@@ -16,9 +16,6 @@ builddir/
 *.md
 !README.md
 
-# VAPI files (not needed at runtime, only build)
-vapi/
-
 # Any compiled objects
 *.o
 *.a

+ 15 - 6
Dockerfile

@@ -1,4 +1,4 @@
-# Multi-stage Dockerfile for Spry Framework Website
+# Multi-stage Dockerfile for Spry Framework Demo Website
 # Build stage: Compile the Vala application
 FROM fedora:43 AS builder
 
@@ -17,13 +17,14 @@ RUN dnf install -y \
     libgee-devel \
     brotli-devel \
     libmicrohttpd-devel \
+    libsodium-devel \
     git \
     pkg-config \
     && dnf clean all
 
 # Clone and build invercargill library
 WORKDIR /build
-RUN git clone https://fabrica.unitatem.net/Tilo15/Invercargill.git invercargill && \
+RUN git clone -b expressions https://fabrica.unitatem.net/Tilo15/Invercargill.git invercargill && \
     cd invercargill && \
     meson setup src builddir --prefix=/usr && \
     ninja -C builddir && \
@@ -53,7 +54,7 @@ RUN git clone https://fabrica.unitatem.net/Tilo15/astralis.git astralis && \
 # Copy the Spry project source
 COPY . /build/spry
 
-# Build the Spry library and website
+# Build the Spry library and demo
 WORKDIR /build/spry
 RUN meson setup builddir --prefix=/usr && \
     ninja -C builddir && \
@@ -72,6 +73,7 @@ RUN dnf install -y \
     brotli \
     libmicrohttpd \
     libgee \
+    libsodium \
     && dnf clean all
 
 # Copy built libraries and executable from builder
@@ -81,7 +83,14 @@ COPY --from=builder /usr/lib64/libinversion*.so* /usr/lib64/
 COPY --from=builder /usr/lib64/libastralis*.so* /usr/lib64/
 COPY --from=builder /usr/lib64/libspry*.so* /usr/lib64/
 COPY --from=builder /usr/lib64/girepository-1.0/*.typelib /usr/lib64/girepository-1.0/
-COPY --from=builder /usr/bin/spry-website /usr/bin/
+COPY --from=builder /usr/bin/spry-demo /usr/bin/
+
+# Copy demo source files for DemoHostComponent to display in the demo viewer
+# These paths must match what DemoHostComponent.source_file expects
+COPY --from=builder /build/spry/demo/DemoComponents /app/demo/DemoComponents
+
+# Set working directory so relative paths in DemoHostComponent resolve correctly
+WORKDIR /app
 
 # Update library cache
 RUN ldconfig
@@ -92,5 +101,5 @@ EXPOSE 8080
 # Set environment variables
 ENV PORT=8080
 
-# Run the website
-CMD ["spry-website", "8080"]
+# Run the demo website
+CMD ["spry-demo", "8080"]

+ 3 - 2
meson.build

@@ -14,8 +14,9 @@ astralis_dep = dependency('astralis-0.1')
 json_glib_dep = dependency('json-glib-1.0')
 invercargill_json_dep = dependency('invercargill-json')
 libxml_dep = dependency('libxml-2.0')
-sodium_deps = [ meson.get_compiler('vala').find_library('libsodium', dirs: vapi_dir),
-                meson.get_compiler('c').find_library('sodium')]
+sodium_vapi = files('vapi/libsodium.vapi')
+sodium_c_lib = meson.get_compiler('c').find_library('sodium', required: true)
+sodium_deps = declare_dependency(sources: sodium_vapi, dependencies: sodium_c_lib)
 
 # VAPI Directory
 add_project_arguments(['--vapidir', vapi_dir], language: 'vala')