From 5e7eae22e94958327aac1cf5da00b5d1a7b27f5e Mon Sep 17 00:00:00 2001 From: Debian Date: Sat, 14 Mar 2026 13:31:26 +0000 Subject: [PATCH] Initial commit: standalone Sova jam server setup --- .env.example | 1 + .gitignore | 1 + Dockerfile | 40 ++++++++++++++++++++++++++++++++++++++++ README.md | 34 ++++++++++++++++++++++++++++++++++ docker-compose.yml | 24 ++++++++++++++++++++++++ 5 files changed, 100 insertions(+) create mode 100644 .env.example create mode 100644 .gitignore create mode 100644 Dockerfile create mode 100644 README.md create mode 100644 docker-compose.yml diff --git a/.env.example b/.env.example new file mode 100644 index 0000000..dcbcf2f --- /dev/null +++ b/.env.example @@ -0,0 +1 @@ +SOVA_PASSWORD=changeme diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..4c49bd7 --- /dev/null +++ b/.gitignore @@ -0,0 +1 @@ +.env diff --git a/Dockerfile b/Dockerfile new file mode 100644 index 0000000..9c36dc2 --- /dev/null +++ b/Dockerfile @@ -0,0 +1,40 @@ +# Stage 1: Build sova-server +FROM rustlang/rust:nightly-bookworm AS builder + +RUN apt-get update && apt-get install -y \ + cmake \ + pkg-config \ + libclang-dev \ + libasound2-dev \ + libdbus-1-dev \ + build-essential \ + git \ + && rm -rf /var/lib/apt/lists/* + +RUN git clone --depth 1 https://github.com/sova-org/Sova.git /sova + +WORKDIR /sova + +# Remove the [patch] section that references a local ../doux/ path +RUN sed -i '/^\[patch\."https:\/\/github.com\/sova-org\/doux"\]/,/^$/d' Cargo.toml + +# Force re-resolution without the doux patch +RUN rm -f Cargo.lock + +RUN cargo build -p sova-server --release --no-default-features + +# Verify the binary name +RUN ls -la target/release/sova* + +# Stage 2: Minimal runtime image +FROM debian:bookworm-slim + +RUN apt-get update && apt-get install -y \ + libasound2 \ + libdbus-1-3 \ + && rm -rf /var/lib/apt/lists/* + +COPY --from=builder /sova/target/release/sova_server /usr/local/bin/sova-server + +ENTRYPOINT ["sova-server"] +CMD ["-i", "0.0.0.0", "-p", "8080"] diff --git a/README.md b/README.md new file mode 100644 index 0000000..5682ac4 --- /dev/null +++ b/README.md @@ -0,0 +1,34 @@ +# Sova Jam Server + +A standalone Docker setup for [Sova](https://github.com/sova-org/Sova), a live coding jam server that lets multiple performers collaborate in real-time over a shared session. + +## Prerequisites + +- Docker +- Docker Compose + +## Quick start + +```bash +cp .env.example .env +# Edit .env and set a strong password +docker compose up -d +``` + +The server will be available on port **8080**. + +## Connecting + +Point your Sova-compatible client to `:8080` and enter the password you configured in `.env`. + +## Configuration + +| Variable | Description | Default | +|----------|-------------|---------| +| `SOVA_PASSWORD` | Password required to join the jam session | `changeme` | + +The server listens on `0.0.0.0:8080` inside the container. To change the exposed port, edit the `ports` mapping in `docker-compose.yml`. + +## Upstream + +Sova is developed at https://github.com/sova-org/Sova diff --git a/docker-compose.yml b/docker-compose.yml new file mode 100644 index 0000000..e6ace87 --- /dev/null +++ b/docker-compose.yml @@ -0,0 +1,24 @@ +services: + sova-server: + build: + context: . + dockerfile: Dockerfile + shm_size: 512m + container_name: sova-server + restart: unless-stopped + ports: + - "8080:8080" + command: ["-i", "0.0.0.0", "-p", "8080", "--password", "${SOVA_PASSWORD}"] + deploy: + resources: + limits: + memory: 256M + cpus: '0.5' + reservations: + memory: 128M + cpus: '0.1' + logging: + driver: "json-file" + options: + max-size: "10m" + max-file: "3"