@@ -73,15 +73,16 @@ For the full walkthrough (including manual setup without scripts), see **[docs/G
7373
7474### Self-hosting (Docker)
7575
76- For running your own production instance from pre-built images :
76+ For running your own production instance:
7777
78- 1 . Clone the repository
79- 2 . Copy ` .env.example ` to ` .env ` and edit the values (see [ docs/ENVIRONMENT.md] ( docs/ENVIRONMENT.md ) )
80- 3 . Create SSL certificates: ` ./deploy/snakeoil.sh `
81- 4 . Run: ` docker-compose pull && docker-compose up `
82- 5 . Visit ` https://localhost `
78+ ``` bash
79+ git clone https://github.com/orcpub/orcpub.git && cd orcpub
80+ ./docker-setup.sh # generates .env, SSL certs, directories
81+ docker compose up -d # pull images and start
82+ ./docker-user.sh init # create admin from .env settings
83+ ```
8384
84- See the [ Docker deployment section] ( #docker-deployment ) for full details.
85+ Visit ` https://localhost ` . See the [ Docker deployment section] ( #docker-deployment ) for full details including migration from older versions .
8586
8687---
8788
@@ -293,36 +294,84 @@ For self-hosting a production instance.
293294
294295### Containers
295296
296- The Docker setup runs three containers:
297-
298297| Container | Purpose |
299298| -----------| ---------|
300- | ` datomic ` | Datomic database transactor |
301- | ` orcpub ` | JVM application server |
302- | ` web ` | nginx reverse proxy with SSL |
299+ | ` datomic ` | Datomic Pro database transactor |
300+ | ` orcpub ` | JVM application server (Java 21) |
301+ | ` web ` | nginx reverse proxy with SSL termination |
302+
303+ ### Fresh Install
304+
305+ ``` bash
306+ git clone https://github.com/orcpub/orcpub.git && cd orcpub
307+
308+ # Interactive setup — generates .env, SSL certs, and directories
309+ ./docker-setup.sh
310+
311+ # Pull pre-built images and start
312+ docker compose up -d
313+
314+ # Create your first user (once containers are healthy)
315+ ./docker-user.sh init # from .env settings
316+ ./docker-user.sh create < username> < email> < password> # or directly
317+ ```
318+
319+ Visit ` https://localhost ` when running.
320+
321+ To build from source instead of pulling images:
322+
323+ ``` bash
324+ docker compose -f docker-compose-build.yaml build
325+ docker compose -f docker-compose-build.yaml up -d
326+ ```
327+
328+ For environment variable details, see [ docs/ENVIRONMENT.md] ( docs/ENVIRONMENT.md ) .
329+
330+ ### Upgrading from Datomic Free (pre-2026)
303331
304- ### Setup
332+ If you have an existing deployment using the old Java 8 / Datomic Free stack,
333+ your ` ./data ` directory is ** not compatible** with the new Datomic Pro transactor.
334+ The storage protocols (` datomic:free:// ` vs ` datomic:dev:// ` ) use different formats.
305335
306- 1 . Clone the repository
307- 2 . Copy ` .env.example ` to ` .env ` and configure (see [ docs/ENVIRONMENT.md] ( docs/ENVIRONMENT.md ) )
308- 3 . Create SSL certificates:
309- - Quick self-signed: ` ./deploy/snakeoil.sh ` (unix) or ` ./deploy/snakeoil.bat ` (windows)
310- - Or use your own certificate
311- 4 . Launch:
336+ ** You must migrate your database before upgrading.** The migration tool handles this:
337+
338+ ** Bare metal** — use ` scripts/migrate-db.sh ` which wraps the ` bin/datomic ` CLI:
312339
313340``` bash
314- docker-compose pull # use pre-built images
315- docker-compose up -d # start in background
341+ ./scripts/migrate-db.sh backup # With old (Free) transactor running
342+ # ... stop Free transactor, move ./data aside, start Pro transactor ...
343+ ./scripts/migrate-db.sh restore " datomic:dev://localhost:4334/orcpub?password=..."
344+ ./scripts/migrate-db.sh verify
316345```
317346
318- To build from source instead :
347+ ** Docker ** — use ` docker-migrate.sh ` which runs ` bin/datomic ` inside containers :
319348
320349``` bash
321- docker-compose -f docker-compose-build.yaml build
322- docker-compose -f docker-compose-build.yaml up -d
350+ ./docker-migrate.sh backup # With old stack running
351+ docker compose down
352+ docker compose -f docker-compose-build.yaml build
353+ docker compose -f docker-compose-build.yaml up -d
354+ ./docker-migrate.sh restore # After new stack is healthy
355+ ./docker-migrate.sh verify
323356```
324357
325- Visit ` https://localhost ` when running.
358+ Or run ` ./docker-migrate.sh full ` for a guided migration.
359+
360+ The backup is storage-protocol-independent and writes to ` ./backup/ ` , so databases
361+ of any size (including 20GB+) are handled. See [ docs/migration/datomic-data-migration.md] ( docs/migration/datomic-data-migration.md )
362+ for the full guide including disk space planning and troubleshooting.
363+
364+ ### User Management
365+
366+ ``` bash
367+ ./docker-user.sh create < user> < email> < password> # Create a verified user
368+ ./docker-user.sh batch users.txt # Bulk create from file
369+ ./docker-user.sh list # List all users
370+ ./docker-user.sh check < user> # Check user status
371+ ./docker-user.sh verify < user> # Verify unverified user
372+ ```
373+
374+ See [ docs/docker-user-management.md] ( docs/docker-user-management.md ) for details.
326375
327376### Importing Homebrew Content
328377
@@ -333,6 +382,15 @@ Place your `.orcbrew` file at `./deploy/homebrew/homebrew.orcbrew` — it loads
333382- ** Database** : Stored in ` ./data/ ` . Back up this directory when Datomic is stopped. Delete it to start fresh.
334383- ** Logs** : Stored in ` ./logs/ ` . Safe to clean up; does not affect character data. Set up log rotation for production.
335384
385+ ### Scripts Reference
386+
387+ | Script | Purpose |
388+ | --------| ---------|
389+ | ` scripts/migrate-db.sh ` | Migrate data from Datomic Free to Pro (bare metal) |
390+ | ` docker-migrate.sh ` | Migrate data from Datomic Free to Pro (Docker) |
391+ | ` docker-setup.sh ` | Generate ` .env ` , SSL certs, and directories |
392+ | ` docker-user.sh ` | Create, verify, and list users in the database |
393+
336394---
337395
338396## Architecture
0 commit comments