A project is only ever at /p/<id>/<slug>; / is the index of the projects
you own or edit. Every project has an owner, who can name editors;
anyone with the link can view. Every edit saves itself, one request in
flight at a time, as a patch of the leaves that changed, and a websocket
(channels + daphne) carries presence and each committed write to
everyone else in the project. The first write to a leaf wins, and the
loser is told.
Undo is per person: a step undoes only if the leaves it touched still
hold what it left, so it never takes a collaborator's work with it.
Named snapshots replace saving, and restore as an ordinary write.
An empty symbol now survives the leaf round trip with `:nodes {}`.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
43 lines
1.4 KiB
Docker
43 lines
1.4 KiB
Docker
FROM node:20-bookworm AS frontend
|
|
|
|
RUN apt-get update \
|
|
&& apt-get install -y --no-install-recommends ca-certificates curl tar \
|
|
&& rm -rf /var/lib/apt/lists/* \
|
|
&& curl -fsSL 'https://api.adoptium.net/v3/binary/latest/21/ga/linux/x64/jdk/hotspot/normal/eclipse' -o /tmp/jdk.tar.gz \
|
|
&& mkdir -p /opt/java \
|
|
&& tar -xzf /tmp/jdk.tar.gz -C /opt/java --strip-components=1 \
|
|
&& rm /tmp/jdk.tar.gz
|
|
|
|
ENV JAVA_HOME=/opt/java
|
|
ENV PATH="/opt/java/bin:${PATH}"
|
|
WORKDIR /app/frontend
|
|
COPY frontend/package.json frontend/package-lock.json ./
|
|
RUN npm ci
|
|
COPY frontend/ ./
|
|
RUN npx shadow-cljs release app
|
|
|
|
FROM python:3.12-slim-bookworm
|
|
|
|
ENV PYTHONDONTWRITEBYTECODE=1 \
|
|
PYTHONUNBUFFERED=1 \
|
|
DJANGO_DEBUG=0 \
|
|
DJANGO_DB_PATH=/data/db.sqlite3 \
|
|
DJANGO_BLOB_ROOT=/data/blobs
|
|
|
|
RUN apt-get update \
|
|
&& apt-get install -y --no-install-recommends ffmpeg \
|
|
&& rm -rf /var/lib/apt/lists/* \
|
|
&& useradd --create-home --shell /usr/sbin/nologin app
|
|
|
|
WORKDIR /app
|
|
COPY requirements.txt ./
|
|
RUN pip install --no-cache-dir -r requirements.txt
|
|
COPY . ./
|
|
COPY --from=frontend /app/static/arthur/js/ ./static/arthur/js/
|
|
RUN python manage.py collectstatic --noinput \
|
|
&& mkdir -p /data \
|
|
&& chown -R app:app /app /data
|
|
|
|
USER app
|
|
EXPOSE 8000
|
|
CMD ["sh", "-c", "python manage.py migrate --noinput && exec daphne --bind 0.0.0.0 --port 8000 server.asgi:application"]
|