objective categorical abstract machine language personal data server
65
fork

Configure Feed

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

Get Docker builds working

futurGH c48efaf4 05a9444d

+58 -12
+3
.dockerignore
··· 7 7 8 8 _opam/ 9 9 _build/ 10 + node_modules/ 10 11 *.lock 11 12 *.locks 13 + *.env 14 + *.install 12 15 13 16 Dockerfile 14 17 docker-compose.yml
+1
.gitignore
··· 4 4 _test_boot 5 5 dune.lock 6 6 dev-tools.locks 7 + *.install 7 8 8 9 node_modules 9 10
+19 -5
Dockerfile
··· 1 1 FROM --platform=linux/amd64 ocaml/opam:debian-12-ocaml-5.2 AS build 2 2 3 + ARG NODE_VERSION=v24.11.1 4 + ARG DUNE_VERSION=3.20.2 5 + 3 6 RUN sudo apt-get install -y cmake git libev-dev libffi-dev libgmp-dev libssl-dev libsqlite3-dev pkg-config 4 7 5 - WORKDIR /home/opam 8 + WORKDIR /home/opam/pegasus 6 9 7 - RUN curl -fsSL https://get.dune.build/install | sh 10 + RUN curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.40.3/install.sh | bash 11 + 12 + ENV NVM_DIR=/home/opam/.nvm 13 + ENV CI=true 14 + 15 + RUN bash -c "source $NVM_DIR/nvm.sh && nvm install $NODE_VERSION && nvm alias default $NODE_VERSION && nvm use default && corepack enable pnpm" 16 + 17 + RUN bash -c "curl -fsSL https://raw.githubusercontent.com/ocaml/opam/master/shell/install.sh | bash -s -- --dev" 18 + RUN opam install dune.$DUNE_VERSION 8 19 9 20 ENV PATH="/home/opam/.local/bin:${PATH}" 10 21 ENV DUNE_CACHE="enabled" 11 22 12 23 ADD . . 13 - RUN dune pkg lock 14 - RUN dune build 24 + 25 + RUN bash -c "source $NVM_DIR/nvm.sh && pnpm install --frozen-lockfile" 26 + 27 + RUN opam exec dune pkg lock 28 + RUN bash -c "source $NVM_DIR/nvm.sh && opam exec dune build -- --release --stop-on-first-error" 15 29 16 30 FROM --platform=linux/amd64 ocaml/opam:debian-12-ocaml-5.2 AS run 17 31 18 32 RUN sudo apt-get install -y libev-dev 19 33 20 - COPY --from=build /home/opam/_build/default/bin/main.exe /bin/pegasus 34 + COPY --from=build /home/opam/pegasus/_build/default/bin/main.exe /bin/pegasus 21 35 22 36 ENTRYPOINT ["/bin/pegasus"]
bin/dune
+6 -1
bin/main.ml
··· 83 83 , "/xrpc/com.atproto.actor.putPreferences" 84 84 , Api.Actor.PutPreferences.handler ) ] 85 85 86 + let public_loader _root path _request = 87 + match Public.read path with 88 + | None -> Dream.empty `Not_Found 89 + | Some asset -> Dream.respond asset 90 + 86 91 let static_routes = 87 - [Dream.get "/public/**" (Dream.static "_build/default/public")] 92 + [Dream.get "/public/**" (Dream.static ~loader:public_loader "")] 88 93 89 94 let main = 90 95 let%lwt db = Data_store.connect ~create:true () in
+14 -3
dune
··· 26 26 (deps 27 27 (:script ../frontend/build.mjs) 28 28 (:entrypoints ../frontend/client/client/frontend/client/client.js) 29 - (source_tree ../frontend/client) 30 - (source_tree ../frontend/src)) 29 + (alias_rec ../frontend/melange) 30 + (package frontend)) 31 31 (action 32 32 (run 33 33 node ··· 35 35 %{entrypoints} 36 36 --output=./client.js 37 37 --extract=true 38 - --env=%{env:NODE_ENV='production'})))) 38 + --env=%{profile})))) 39 + 40 + (subdir 41 + bin/ 42 + (rule 43 + (target public.ml) 44 + (deps 45 + (file ../public/client.js) 46 + (file ../public/index.css) 47 + (source_tree ../public/fonts)) 48 + (action (with-stdout-to %{null} 49 + (run ocaml-crunch -e woff -e woff2 -e js -e css -m plain ../public -o %{target})))))
+1
dune-project
··· 69 69 ppx_rapper 70 70 ppx_rapper_lwt 71 71 (alcotest :with-test) 72 + crunch 72 73 (ocamlformat-mlx :with-dev-setup) 73 74 (ocamlmerlin-mlx :with-dev-setup))) 74 75
+11
dune-workspace
··· 1 + (lang dune 3.20) 2 + 3 + (lock_dir 4 + (path dune.lock) 5 + (solve_for_platforms 6 + ((arch arm64) 7 + (os macos)) 8 + ((arch arm64) 9 + (os linux)) 10 + ((arch x86_64) 11 + (os linux))))
+1 -1
frontend/build.mjs
··· 7 7 const outdir = path.dirname(outfile); 8 8 const splitting = true; 9 9 10 - const isDev = env === "development"; 10 + const isDev = env === "dev"; 11 11 12 12 try { 13 13 const result = await viteBuild({
+1
pegasus.opam
··· 30 30 "ppx_rapper" 31 31 "ppx_rapper_lwt" 32 32 "alcotest" {with-test} 33 + "crunch" 33 34 "ocamlformat-mlx" {with-dev-setup} 34 35 "ocamlmerlin-mlx" {with-dev-setup} 35 36 "odoc" {with-doc}
+1 -2
pegasus/lib/migrations.ml
··· 105 105 List.filter (fun (id, _, _) -> not (List.mem id applied)) available 106 106 in 107 107 match pending with 108 - | [] -> 109 - Lwt_io.printl "no pending migrations" 108 + | [] -> Lwt.return_unit 110 109 | _ -> 111 110 let%lwt () = 112 111 Lwt_io.printlf "found %d pending migrations" (List.length pending)