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.

Optimise Containerfile a bit more I think


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

+23 -11
+23 -11
Containerfile
··· 1 1 FROM docker.io/oven/bun:latest AS style-client 2 + COPY ./client/bun.lock ./client/package.json /app/ 3 + RUN bun install --cwd=/app/ --production 2 4 COPY ./client/ /app/ 3 - RUN bun install --cwd=/app/ 4 5 RUN mkdir -p /app/prepped && bun x @tailwindcss/cli -i /app/app.css -o /app/prepped/lumina_client.css 5 6 6 7 FROM ghcr.io/gleam-lang/gleam:v1.15.2-erlang-alpine AS build-client 7 - COPY --from=style-client /app/ /app/ 8 - RUN cd /app/ && gleam build --target javascript 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" 8 + WORKDIR /app 9 + COPY ./client/gleam.toml ./client/manifest.toml ./ 10 + RUN gleam deps download 11 + COPY ./client/ ./ 12 + COPY --from=style-client /app/prepped/ /app/prepped/ 13 + RUN gleam build --target javascript 14 + RUN find ./src/ -type f -print0 | xargs -0 sha256sum | sha256sum | awk '{print $1}' > "/app/prepped/lumina_client_rev.hash" 15 + RUN mkdir -p "build/dev/javascript/dist" && mv prepped/* "build/dev/javascript/dist" 16 + 11 17 12 18 FROM docker.io/oven/bun:latest AS package-client 13 19 COPY --from=build-client /app/build/dev/javascript/ /build 14 20 WORKDIR /build 15 21 RUN echo 'import { main } from "./lumina_client.mjs";document.addEventListener("DOMContentLoaded", main())' > "/build/lumina_client/entry.mjs" 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 22 + RUN bun build --target=browser --minify /build/lumina_client/entry.mjs --outfile /build/dist/lumina_client.min.mjs && \ 23 + bun build --target=browser /build/lumina_client/entry.mjs --outfile /build/dist/lumina_client.mjs 18 24 19 25 FROM ghcr.io/gleam-lang/gleam:v1.15.2-erlang-alpine AS package-server 26 + RUN apk add build-base 27 + WORKDIR /app 28 + COPY ./server/gleam.toml ./server/manifest.toml ./ 29 + RUN gleam deps download 20 30 COPY ./server/ /app/ 21 - RUN apk add build-base 22 - COPY --from=package-client /build/dist /app/priv/static 23 31 RUN cd /app/ && gleam export erlang-shipment 24 32 25 - FROM docker.io/library/erlang:28.4.2.0-alpine 26 - COPY --from=package-server /app/build/erlang-shipment /app 33 + FROM docker.io/library/erlang:28-alpine 34 + RUN adduser -D lumina 35 + USER lumina 36 + WORKDIR /app 37 + COPY --from=package-server --chown=lumina:lumina /app/build/erlang-shipment /app 38 + COPY --from=package-client --chown=lumina:lumina /build/dist /app/lumina_server/priv/static 27 39 VOLUME /data 28 40 ENTRYPOINT ["/app/entrypoint.sh", "run"]