Skip to content
Open
Show file tree
Hide file tree
Changes from 1 commit
Commits
Show all changes
59 commits
Select commit Hold shift + click to select a range
9890983
chore: migrate to using dune package management
sabine May 26, 2025
052da15
make Dockerfile use Dune Developer Preview to build
sabine May 28, 2025
d012918
update Makefile to use Dune Developer Preview
sabine May 28, 2025
056143a
remove .opam files
sabine May 28, 2025
03ed5cb
update HACKING.md for dune pkg, CONTRIBUTING.md doesn't need updating
sabine Jun 6, 2025
e9add8b
attempt to make Playground build with Dune Developer Preview (fails)
sabine May 28, 2025
f2a124d
Build playground with dune pkg
Sudha247 Jun 11, 2025
1f81110
update CI to use Dune Developer Preview
sabine Jun 16, 2025
5310706
update scraper workflow to use dev preview
sabine Jun 16, 2025
3c1d0a7
copy playground cmi files
sabine Jun 16, 2025
f5efbab
update playground gitignore
sabine Jun 17, 2025
7a26498
remove opam.locked file
sabine Jun 17, 2025
f4b7c91
rely on dune.lock
sabine Jun 17, 2025
3074548
remove obsolete config
sabine Jun 17, 2025
636a588
build scraper in makefile
sabine Jun 17, 2025
18c5973
rely on dune.lock
sabine Jun 17, 2025
490181a
Pin dune pkg to a specific version in the Dockerfile
Sudha247 Jul 17, 2025
87cb879
update Dockerfile and HACKING.md
Sudha247 Jul 18, 2025
87c681c
revert accidental playground changes
sabine Jul 23, 2025
2cf37c1
Update to use Dune binary
Sudha247 Aug 1, 2025
0ba1af7
Address review comments
Sudha247 Aug 1, 2025
b180e20
add ocamlformat as a test dependency
Sudha247 Aug 1, 2025
dc83438
remove river pin
sabine Aug 19, 2025
47b01d1
reduce changes to playground dune-project
sabine Aug 19, 2025
2e17363
update README.md and HACKING.md
sabine Aug 28, 2025
b3fd1d9
update workflows to use Dune 3.19.1 binary
sabine Aug 28, 2025
ab45fb5
add a workflow to build every day using Dune Developer Preview
sabine Aug 28, 2025
3d372ed
remove unnecessary compiler version parameter from workflows
sabine Aug 28, 2025
c927ae8
Update Dockerfile @gridbugs
sabine Sep 9, 2025
b16de58
update workflows to use ocaml-dune/setup-dune@v1
sabine Sep 9, 2025
2d22624
update contributor docs to mention opam-repository pin upgrade process
sabine Sep 9, 2025
f6b377c
add a note for contributors for troubleshooting build issue after rebase
sabine Sep 9, 2025
776e0a2
be more precise
sabine Sep 9, 2025
d50b14b
Fix make clean, add make wipe
cuihtlauac Oct 2, 2025
9125e06
Update Dockerfile
sabine Oct 6, 2025
7c92a48
Update Dockerfile
sabine Oct 6, 2025
b5731d4
Update Dockerfile
sabine Oct 6, 2025
269508d
Apply suggestion from @MisterDA
sabine Oct 6, 2025
c99a3d1
Apply suggestion from @MisterDA
sabine Oct 6, 2025
34076cd
Update playground/dune to use `ocaml-config` instead of `ocamlopt`
sabine Oct 6, 2025
64ec3f9
Update Dockerfile
sabine Oct 6, 2025
a19a329
use 'latest' version of Dune
sabine Oct 13, 2025
5d7eae3
Update Dockerfile to use alpine:3.22
sabine Oct 13, 2025
433b700
update maintainer docs to reflect Dockerfile not pinning opam-repository
sabine Oct 13, 2025
a07f4ea
use dune 3.20.1 again because 'latest' is not downloadable via the sh…
sabine Oct 13, 2025
348ab34
add announcement post about this migration
sabine Oct 14, 2025
aca8154
use --network=host on docker build command in Makefile
sabine Oct 29, 2025
e907f4f
corrections to the included OCaml Backstage post
sabine Oct 29, 2025
de1e62f
rename
sabine Oct 29, 2025
b9eee75
update playground/dune-workspace to also rely on overlay repository
sabine Oct 29, 2025
bda6f03
Fix playground build by properly resolving jsoo_listunits path
sabine Oct 29, 2025
945a19c
Fix markdown linting error in Dune package management blog post
sabine Oct 29, 2025
d18e313
correct a comment in Dockerfile
sabine Oct 29, 2025
a2ff129
address @MisterDA review from 2 weeks ago
sabine Oct 29, 2025
31b7fdb
remaining Oct 3 review changes from @MisterDA review
sabine Oct 29, 2025
26d592c
had to add back -s 3.20.1 on the Dune installation in Dockerfile beca…
sabine Oct 29, 2025
89545d6
correct invocation of Dune install script to use the latest stable ve…
sabine Oct 29, 2025
3b2139b
use latest stable version of dune in all CI actions
sabine Oct 29, 2025
d2b11f8
upgrade to alpine:3.22 on the container to be deployed
sabine Oct 29, 2025
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .dockerignore
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
!tool/
!dune
!dune-project
!ocamlorg.opam
!dune-workspace
!tailwind.config.js
!init-cache
!.git
38 changes: 18 additions & 20 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,7 +1,10 @@
FROM ocaml/opam:alpine-3.21-ocaml-5.2 AS build
FROM alpine:3.21 AS build
Comment thread
sabine marked this conversation as resolved.
Outdated
Comment thread
sabine marked this conversation as resolved.
Outdated

# Install system dependencies
RUN sudo apk -U upgrade --no-cache && sudo apk add --no-cache \
RUN apk -U upgrade --no-cache && apk add --no-cache \
Comment thread
sabine marked this conversation as resolved.
Outdated
# to download and install Dune Developer Preview with alpine:3.21
build-base patch tar ca-certificates git rsync curl sudo bash \
libx11-dev nano coreutils xz \
autoconf \
curl-dev \
gmp-dev \
Expand All @@ -10,25 +13,20 @@ RUN sudo apk -U upgrade --no-cache && sudo apk add --no-cache \
oniguruma-dev \
openssl-dev

# Use Opam 2.2 and enable the backup mirror if primary sources of packages are unavailable
RUN sudo mv /usr/bin/opam-2.2 /usr/bin/opam && opam update
RUN opam option --global 'archive-mirrors+="https://opam.ocaml.org/cache"'

# Branch freeze was opam-repo HEAD at the time of commit
RUN cd ~/opam-repository && git reset --hard 584630e7a7e27e3cf56158696a3fe94623a0cf4f && opam update

WORKDIR /home/opam

# Install opam dependencies
COPY --chown=opam ocamlorg.opam .
RUN opam install . --deps-only
# Install Dune Developer Preview
RUN curl -fsSL https://get.dune.build/install | sh
RUN /bin/bash -c 'source "/root/.local/share/dune/env/env.bash"'
Comment thread
sabine marked this conversation as resolved.
Outdated
ENV PATH="/root/.local/bin:$PATH"

# Build project
COPY --chown=opam . .
RUN opam exec -- dune build @install --profile=release
WORKDIR "/root/ocaml.org"
COPY --chown=root . .
RUN ls

RUN dune pkg lock
RUN dune build @install --profile=release

# Launch project in order to generate the package state cache
RUN cd ~/opam-repository && git checkout master && git pull origin master && opam update
ENV OCAMLORG_PKG_STATE_PATH=package.state \
OCAMLORG_REPO_PATH=opam-repository
RUN touch package.state && ./init-cache package.state
Expand All @@ -40,9 +38,9 @@ RUN apk -U upgrade --no-cache && apk add --no-cache \
gmp \
libev

COPY --from=build /home/opam/package.state /var/package.state
COPY --from=build /home/opam/opam-repository /var/opam-repository
COPY --from=build /home/opam/_build/default/src/ocamlorg_web/bin/main.exe /bin/server
COPY --from=build "/root/ocaml.org/package.state" /var/package.state
COPY --from=build "/root/ocaml.org/opam-repository" /var/opam-repository
COPY --from=build "/root/ocaml.org/_build/default/src/ocamlorg_web/bin/main.exe" /bin/server
Comment thread
sabine marked this conversation as resolved.
Outdated

COPY playground/asset playground/asset
Comment thread
sabine marked this conversation as resolved.
Outdated

Expand Down
2 changes: 1 addition & 1 deletion init-cache
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ STATE=$1

rm -f $STATE
touch $STATE
opam exec -- dune exec src/ocamlorg_web/bin/main.exe &
dune exec src/ocamlorg_web/bin/main.exe &
PID=$!
echo PID=$PID
inotifywait -e close_write $STATE