Files
Ferrous-Solitaire/README_SERVER.md
T
root 34ba4dc6ed feat(workspace): full server + sync implementation, all tests green
- solitaire_server: Axum auth, sync push/pull, leaderboard, daily
  challenge, account deletion, JWT middleware, rate limiting via
  tower_governor, SQLite migrations, health endpoint
- solitaire_server: expose build_test_router (no rate limiting) so
  integration tests work without a peer IP in oneshot requests
- solitaire_sync: SyncPayload, merge logic, shared API types
- solitaire_data: SyncProvider trait, LocalOnlyProvider,
  SolitaireServerClient, auth_tokens keyring integration, blanket
  Box<dyn SyncProvider> impl
- solitaire_data/settings: derive Default on SyncBackend (clippy fix)
- .sqlx/: offline query cache so server compiles without a live DB
- sqlx: removed non-existent "offline" feature flag
- keyring v2: fixed Entry::new() returning Result<Entry>
- sqlx 0.8: all SQLite TEXT columns wrapped in Option<T>
- Integration tests: max_connections(1) on in-memory pool so all
  connections share the same schema

All 191 tests pass; cargo clippy -D warnings clean.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-04-26 23:32:56 +00:00

1.1 KiB

Solitaire Quest — Self-Hosting Guide

Prerequisites

  • Docker and Docker Compose
  • openssl for generating a JWT secret

Quick start

  1. Clone the repo and enter it.
  2. Copy the example environment file and fill in your values:
    cp .env.example .env
    # Edit .env: set JWT_SECRET and SOLITAIRE_DOMAIN
    
  3. (First time only) Generate the sqlx query cache so the server builds without a live database:
    cargo install sqlx-cli --no-default-features --features rustls,sqlite
    export DATABASE_URL=sqlite://solitaire.db
    sqlx database create
    sqlx migrate run --source solitaire_server/migrations
    cargo sqlx prepare --workspace
    rm solitaire.db   # the real DB lives in ./data/ at runtime
    
  4. Start everything:
    docker compose up -d
    
  5. The server is now reachable at https://<SOLITAIRE_DOMAIN>.

Backups

The entire server state is one SQLite file at ./data/solitaire.db. Back it up with:

sqlite3 ./data/solitaire.db ".backup backup_$(date +%Y%m%d).db"

Updating

git pull
docker compose build
docker compose up -d