From be6dce4d4a2ec8518af64ce2f7541ff710d60bb2 Mon Sep 17 00:00:00 2001 From: SirBlobby Date: Sat, 18 Jul 2026 15:06:12 -0400 Subject: [PATCH] Add prebuilt image to README --- README.md | 51 +++++++++++++++++++++++++++++++++++++++++++++------ 1 file changed, 45 insertions(+), 6 deletions(-) diff --git a/README.md b/README.md index 8298a03..1132edc 100644 --- a/README.md +++ b/README.md @@ -1,6 +1,6 @@ # TypstDrive -[![Version](https://img.shields.io/badge/version-1.4.8-blue.svg)](https://github.com/your-username/typstdrive) +[![Version](https://img.shields.io/badge/version-1.4.8-blue.svg)](https://github.com/sirblobby/typstdrive) [![Typst Version](https://img.shields.io/badge/Typst-0.14.2-239dad?logo=typst&logoColor=white)](https://typst.app/) [![Rust](https://img.shields.io/badge/Rust-1.82+-orange?logo=rust&logoColor=white)](https://www.rust-lang.org/) [![SvelteKit](https://img.shields.io/badge/SvelteKit-5-ff3e00?logo=svelte)](https://kit.svelte.dev/) @@ -105,21 +105,60 @@ TypstDrive is completely self-hostable. A Docker image packages both the Rust ba ### Getting Started -1. Clone the repository: +1. Pull the image: ```bash - git clone https://github.com/your-username/typstdrive.git - cd typstdrive + docker pull ghcr.io/sirblobby/typstdrive:latest ``` -2. Start the application: +2. Save this as `docker-compose.yml`: + ```yaml + services: + app: + image: ghcr.io/sirblobby/typstdrive:latest + container_name: typstdrive + restart: unless-stopped + ports: + - "3000:3000" + environment: + - DATABASE_URL=sqlite:///data/typstdrive.db?mode=rwc + - DB_TYPE=sqlite + # Generate with: openssl rand -hex 64 + - COOKIE_SECRET=your-64-plus-byte-secret-here + - ALLOW_REGISTRATION=false + - RUST_LOG=info + volumes: + - appdata:/data + + volumes: + appdata: + ``` + +3. Start it: ```bash docker compose up -d ``` -3. Open your browser and navigate to `http://localhost:3000`. +4. Open your browser and navigate to `http://localhost:3000`. On first launch with no users in the database, you will be redirected to the **Setup** page to create the initial admin account. +To update, pull the new image and recreate the container: + +```bash +docker compose pull +docker compose up -d +``` + +### Building from Source + +To build the image yourself instead of pulling it, clone the repository and use the bundled compose file, which builds from the local `Dockerfile`: + +```bash +git clone https://github.com/sirblobby/typstdrive.git +cd typstdrive +docker compose up -d +``` + ### Data Storage By default, TypstDrive uses **SQLite** — no separate database container required. All data is stored in a single file persisted via the `appdata` Docker volume.