mirror of
https://github.com/vitorpamplona/amethyst.git
synced 2026-10-30 07:37:38 +00:00
Quartz moves to its own repo, the way the crypto primitives moved to crypto-kmp. Every module depends on com.vitorpamplona.quartz:quartz 2.0.0 (libs.quartz) instead of :quartz, and -PquartzDir=../quartz builds a local checkout instead of the artifact, for every module and for quic's own quartz dependency (which replaces the root build's substitution of the published quartz with :quartz). What moved with quartz: its CI jobs (lint tasks, test-quartz-linux-native, test-quartz-ios), the Maven Central publish step of the release workflow, jitpack.yml, tools/unicode-nfkc, the nostr-expert and event-store-semantics skills, the agent-skill check, and the README's library usage docs. What stays here: - The four quartz client tests that need a real Ktor socket relay (TrustNetworkSync*, GiantReqStreamTest, BulkDownloadBenchmark) move to geode's tests; geode forwards -PprodRelayBench for the latter. quartz's other relay-client tests now use a test relay of its own, which ends quartz's test dependency on geode. - The benchmark module's resources (previously read from quartz's androidDeviceTest resources) move into benchmark/; relayBench --real reads the corpus from there. - NoteComposeKindCoverageTest reads EventFactory.kt from quartz's JVM sources jar, or from the -PquartzDir checkout, passed by commonsUI's build. - commons and commonsUI declare crypto-kmp (and commons mls-kmp), which they import directly. Through quartz's api alone, a -PcryptoKmpDir checkout never reached the common metadata compile. - The catalog drops what only quartz used (kchesslib, negentropy, jackson-databind, sqlite-bundled, secp256k1-kmp common, compose runtime-annotation, the maven-publish plugin). agent_config_check checks a skill's quartz/... paths against a ../quartz checkout when there is one and skips them otherwise. AGENTS.md, the skills, CONTRIBUTING, BUILDING, RELEASE_OPS, PLANS and the READMEs point at the new repo. Needs quartz 2.0.0 (and crypto-kmp 1.0.0) on Maven Central before CI can resolve it. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01DEkJaDWYrcTbGvT8JLQCrG
62 lines
2.6 KiB
Docker
62 lines
2.6 KiB
Docker
# Multi-stage image for the geode Nostr relay.
|
|
#
|
|
# Build from the REPO ROOT (the build needs the whole Gradle project), pointing
|
|
# at this file:
|
|
#
|
|
# docker build -f geode/Dockerfile -t geode:local .
|
|
# docker run --rm -p 7447:7447 geode:local
|
|
#
|
|
# That runs the relay on 0.0.0.0:7447 with the built-in in-memory store — events
|
|
# vanish on restart. For a persistent, configured deployment, mount a config and
|
|
# a data volume:
|
|
#
|
|
# docker run -d --name geode -p 7447:7447 \
|
|
# -v $PWD/geode.toml:/etc/geode/geode.toml:ro \
|
|
# -v geode-data:/var/lib/geode \
|
|
# geode:local --config /etc/geode/geode.toml
|
|
#
|
|
# with `file = "/var/lib/geode/events.db"` and `in_memory = false` in geode.toml.
|
|
#
|
|
# Published to GHCR on every release by .github/workflows/create-release.yml
|
|
# (docker-geode job) as ghcr.io/vitorpamplona/geode:<version> and :latest.
|
|
|
|
# --- build stage ------------------------------------------------------------
|
|
FROM eclipse-temurin:21-jdk AS build
|
|
WORKDIR /src
|
|
# Copy the whole repo (geode depends only on quartz, but the Gradle build needs
|
|
# settings.gradle.kts, the version catalog, and the wrapper). .dockerignore keeps
|
|
# build outputs and VCS metadata out of the context.
|
|
COPY . .
|
|
# installDist emits bin/geode + lib/*.jar under geode/build/install/geode.
|
|
RUN ./gradlew --no-daemon :geode:installDist
|
|
|
|
# --- runtime stage ----------------------------------------------------------
|
|
FROM eclipse-temurin:21-jre
|
|
LABEL org.opencontainers.image.source="https://github.com/vitorpamplona/amethyst"
|
|
LABEL org.opencontainers.image.description="geode — a standalone Nostr relay"
|
|
LABEL org.opencontainers.image.licenses="MIT"
|
|
|
|
# Run as a non-root user that owns the data dir.
|
|
RUN groupadd --system geode \
|
|
&& useradd --system --gid geode --home-dir /var/lib/geode --shell /usr/sbin/nologin geode \
|
|
&& mkdir -p /var/lib/geode \
|
|
&& chown geode:geode /var/lib/geode
|
|
|
|
COPY --from=build /src/geode/build/install/geode /opt/geode
|
|
# Ship the example config for reference inside the image.
|
|
COPY --from=build /src/geode/config.example.toml /opt/geode/share/geode/config.example.toml
|
|
ENV PATH="/opt/geode/bin:${PATH}"
|
|
|
|
VOLUME /var/lib/geode
|
|
EXPOSE 7447
|
|
USER geode
|
|
|
|
# Liveness: the default WebSocket port accepts a TCP connection. Uses bash's
|
|
# /dev/tcp (the temurin image is Ubuntu-based) so no curl/nc is needed. Override
|
|
# the port with --port and this HEALTHCHECK together if you remap it.
|
|
HEALTHCHECK --interval=30s --timeout=5s --start-period=10s --retries=3 \
|
|
CMD bash -c 'exec 3<>/dev/tcp/127.0.0.1/7447' || exit 1
|
|
|
|
ENTRYPOINT ["/opt/geode/bin/geode"]
|
|
CMD ["--host", "0.0.0.0", "--port", "7447"]
|