Auto-indexing service and GraphQL API for AT Protocol Records quickslice.slices.network/
atproto gleam graphql

simplify example

+2 -178
-4
example/Dockerfile
··· 1 - FROM ghcr.io/bigmoves/quickslice:latest 2 - 3 - # Copy custom lexicons into the image 4 - COPY ./lexicons /app/server/priv/lexicons
···
-135
example/README.md
··· 1 - # quickslice Docker Example 2 - 3 - This example demonstrates how to run quickslice using the published Docker image with custom lexicons. 4 - 5 - ## Directory Structure 6 - 7 - ``` 8 - example/ 9 - ├── Dockerfile # Custom Dockerfile (optional) 10 - ├── docker-compose.yml # Docker Compose configuration 11 - ├── lexicons/ # Custom lexicons directory 12 - │ └── xyz/ 13 - │ └── statusphere/ 14 - │ └── status.json 15 - └── README.md # This file 16 - ``` 17 - 18 - ## Quick Start 19 - 20 - ### Using Docker Compose (Recommended) 21 - 22 - ```bash 23 - cd example 24 - docker-compose up 25 - ``` 26 - 27 - The server will be available at `http://localhost:8000` 28 - 29 - ### Using Docker Directly 30 - 31 - ```bash 32 - cd example 33 - docker run -p 8000:8000 \ 34 - -v $(pwd)/lexicons:/app/server/priv/lexicons:ro \ 35 - ghcr.io/bigmoves/quickslice:latest 36 - ``` 37 - 38 - ## Custom Lexicons 39 - 40 - The `lexicons/` directory is mounted to `/app/server/priv/lexicons` in the container. This allows you to provide custom AT Protocol lexicons without rebuilding the image. 41 - 42 - ### Adding Your Own Lexicon 43 - 44 - 1. Create a directory structure following the NSID format: 45 - ``` 46 - lexicons/ 47 - └── com/ 48 - └── example/ 49 - └── myrecord.json 50 - ``` 51 - 52 - 2. Create your lexicon JSON file: 53 - ```json 54 - { 55 - "lexicon": 1, 56 - "id": "com.example.myrecord", 57 - "defs": { 58 - "main": { 59 - "type": "record", 60 - "key": "tid", 61 - "record": { 62 - "type": "object", 63 - "required": ["text"], 64 - "properties": { 65 - "text": { 66 - "type": "string", 67 - "maxLength": 300 68 - }, 69 - "createdAt": { 70 - "type": "string", 71 - "format": "datetime" 72 - } 73 - } 74 - } 75 - } 76 - } 77 - } 78 - ``` 79 - 80 - 3. Restart the container to load the new lexicon 81 - 82 - ## Environment Variables 83 - 84 - You can customize the server configuration using environment variables in `docker-compose.yml`: 85 - 86 - - `HOST` - Server host (default: `0.0.0.0`) 87 - - `PORT` - Server port (default: `8000`) 88 - 89 - ## GraphQL Endpoint 90 - 91 - Once running, access the GraphQL endpoint at: 92 - - `http://localhost:8000/graphql` 93 - 94 - ## Volume Mounts 95 - 96 - - `./lexicons:/app/server/priv/lexicons:ro` - Mounts local lexicons directory as read-only 97 - 98 - The `:ro` flag makes the mount read-only for security. 99 - 100 - ## Stopping the Server 101 - 102 - ```bash 103 - docker compose down 104 - ``` 105 - 106 - ## Pulling Latest Image 107 - 108 - ```bash 109 - docker compose pull 110 - docker compose up -d 111 - ``` 112 - 113 - ## Troubleshooting 114 - 115 - ### Port Already in Use 116 - 117 - If port 8000 is already in use, change it in `docker-compose.yml`: 118 - 119 - ```yaml 120 - ports: 121 - - "3000:8000" # Maps local port 3000 to container port 8000 122 - ``` 123 - 124 - ### Lexicons Not Loading 125 - 126 - Ensure your lexicon files: 127 - 1. Follow the correct directory structure (namespace/path/file.json) 128 - 2. Have valid JSON syntax 129 - 3. Match the NSID in the filename path 130 - 131 - ### Viewing Logs 132 - 133 - ```bash 134 - docker-compose logs -f quickslice 135 - ```
···
-3
example/docker-compose.yml
··· 5 image: ghcr.io/bigmoves/quickslice:latest 6 ports: 7 - "8000:8000" 8 - volumes: 9 - # Mount local lexicons directory to /app/priv/lexicons in the container 10 - - ./lexicons:/app/priv/lexicons:ro 11 environment: 12 - HOST=0.0.0.0 13 - PORT=8000
··· 5 image: ghcr.io/bigmoves/quickslice:latest 6 ports: 7 - "8000:8000" 8 environment: 9 - HOST=0.0.0.0 10 - PORT=8000
-31
example/fly.toml
··· 1 - # fly.toml app configuration file generated for quickslice on 2025-10-29T21:49:03-07:00 2 - # 3 - # See https://fly.io/docs/reference/configuration/ for information about how to use this file. 4 - # 5 - 6 - app = 'quickslice' 7 - primary_region = 'sjc' 8 - 9 - [build] 10 - 11 - [env] 12 - DATABASE_URL = '/data/quickslice.db' 13 - HOST = '0.0.0.0' 14 - PORT = '8080' 15 - 16 - [http_service] 17 - internal_port = 8080 18 - force_https = true 19 - auto_stop_machines = 'stop' 20 - auto_start_machines = true 21 - min_machines_running = 1 22 - processes = ['app'] 23 - 24 - [[mounts]] 25 - source = 'app_data' 26 - destination = '/data' 27 - 28 - [[vm]] 29 - memory = '1gb' 30 - cpu_kind = 'shared' 31 - cpus = 1
···
+2 -5
example/lexicons.json
··· 1 { 2 - "lexicons": [ 3 - "app.bsky.actor.profile", 4 - "bsky.actor.profile" 5 - ] 6 - }
··· 1 { 2 + "lexicons": ["app.bsky.actor.profile"] 3 + }