For now? I'm experimenting on an old concept.
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

Fix some things I forgot about


Signed-off-by: MLC Bloeiman <mar@strawmelonjuice.com>

+23 -17
+1 -9
.dockerignore
··· 8 8 *.bak 9 9 *.DS_Store 10 10 11 - # Rust build output 12 - target/ 13 - 14 - # Node/Bun/Gleam build output 15 - client/build/ 16 - client/node_modules/ 17 - client/bun.lockb 18 - 19 11 # Editor/IDE files 20 12 .vscode/ 21 13 .idea/ ··· 26 18 .env.*.local 27 19 28 20 docker/ 29 - data/ 21 + data/
+11 -4
Containerfile
··· 1 - FROM ghcr.io/gleam-lang/gleam:v1.15.2-erlang-alpine AS build-client 1 + FROM docker.io/oven/bun:latest AS style-client 2 2 COPY ./client/ /app/ 3 + RUN bun install --cwd=/app/ 4 + RUN mkdir -p /app/prepped && bun x @tailwindcss/cli -i /app/app.css -o /app/prepped/lumina_client.css 5 + 6 + FROM ghcr.io/gleam-lang/gleam:v1.15.2-erlang-alpine AS build-client 7 + COPY --from=style-client /app/ /app/ 3 8 RUN cd /app/ && gleam build --target javascript 4 - RUN mkdir -p "/app/build/dev/javascript/lumina_client/dist" && find ./src/ -type f -print0 | xargs -0 sha256sum | sha256sum | awk '{print $1}' > "/app/build/dev/javascript/lumina_client/dist/lumina_client_rev.hash" 9 + RUN cd /app/ && find ./src/ -type f -print0 | xargs -0 sha256sum | sha256sum | awk '{print $1}' > "/app/prepped/lumina_client_rev.hash" 10 + RUN mkdir -p "/app/build/dev/javascript/dist" && mv /app/prepped/* "/app/build/dev/javascript/dist" 5 11 6 12 FROM docker.io/oven/bun:latest AS package-client 7 13 COPY --from=build-client /app/build/dev/javascript/ /build 8 14 WORKDIR /build 9 15 RUN echo 'import { main } from "./lumina_client.mjs";document.addEventListener("DOMContentLoaded", main())' > "/build/lumina_client/entry.mjs" 10 - RUN bun build --target=browser --minify /build/lumina_client/entry.mjs --outfile /build/dist/lumina_client.min.js 11 - RUN bun build --target=browser /build/lumina_client/entry.mjs --outfile /build/dist/lumina_client.js 16 + RUN bun build --target=browser --minify /build/lumina_client/entry.mjs --outfile /build/dist/lumina_client.min.mjs 17 + RUN bun build --target=browser /build/lumina_client/entry.mjs --outfile /build/dist/lumina_client.mjs 12 18 13 19 FROM ghcr.io/gleam-lang/gleam:v1.15.2-erlang-alpine AS package-server 14 20 COPY ./server/ /app/ ··· 18 24 19 25 FROM docker.io/library/erlang:28.4.2.0-alpine 20 26 COPY --from=package-server /app/build/erlang-shipment /app 27 + VOLUME /data 21 28 ENTRYPOINT ["/app/entrypoint.sh", "run"]
+11 -4
server/src/lumina_server.gleam
··· 156 156 >>, 157 157 client_hash |> bit_array.from_string, 158 158 <<"\";</script><script type=\"module\">":utf8>>, 159 - { 160 - let assert Ok(client_js) = 161 - simplifile.read_bits(assets <> "/static/lumina_client.min.mjs") 162 - client_js 159 + case simplifile.read_bits(assets <> "/static/lumina_client.min.mjs") { 160 + Error(_) -> { 161 + setuplog 162 + |> woof.log(woof.Error, "Missing application assets.", [ 163 + woof.field("File", assets <> "/static/lumina_client.min.mjs"), 164 + ]) 165 + panic as "Missing application assets." 166 + } 167 + Ok(outcome) -> { 168 + outcome 169 + } 163 170 }, 164 171 <<"</script></head><body id=\"app\"></body></html>":utf8>>, 165 172 ]