···11-FROM ghcr.io/bigmoves/quickslice:latest
22-33-# Copy custom lexicons into the image
44-COPY ./lexicons /app/server/priv/lexicons
-135
example/README.md
···11-# quickslice Docker Example
22-33-This example demonstrates how to run quickslice using the published Docker image with custom lexicons.
44-55-## Directory Structure
66-77-```
88-example/
99-├── Dockerfile # Custom Dockerfile (optional)
1010-├── docker-compose.yml # Docker Compose configuration
1111-├── lexicons/ # Custom lexicons directory
1212-│ └── xyz/
1313-│ └── statusphere/
1414-│ └── status.json
1515-└── README.md # This file
1616-```
1717-1818-## Quick Start
1919-2020-### Using Docker Compose (Recommended)
2121-2222-```bash
2323-cd example
2424-docker-compose up
2525-```
2626-2727-The server will be available at `http://localhost:8000`
2828-2929-### Using Docker Directly
3030-3131-```bash
3232-cd example
3333-docker run -p 8000:8000 \
3434- -v $(pwd)/lexicons:/app/server/priv/lexicons:ro \
3535- ghcr.io/bigmoves/quickslice:latest
3636-```
3737-3838-## Custom Lexicons
3939-4040-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.
4141-4242-### Adding Your Own Lexicon
4343-4444-1. Create a directory structure following the NSID format:
4545- ```
4646- lexicons/
4747- └── com/
4848- └── example/
4949- └── myrecord.json
5050- ```
5151-5252-2. Create your lexicon JSON file:
5353- ```json
5454- {
5555- "lexicon": 1,
5656- "id": "com.example.myrecord",
5757- "defs": {
5858- "main": {
5959- "type": "record",
6060- "key": "tid",
6161- "record": {
6262- "type": "object",
6363- "required": ["text"],
6464- "properties": {
6565- "text": {
6666- "type": "string",
6767- "maxLength": 300
6868- },
6969- "createdAt": {
7070- "type": "string",
7171- "format": "datetime"
7272- }
7373- }
7474- }
7575- }
7676- }
7777- }
7878- ```
7979-8080-3. Restart the container to load the new lexicon
8181-8282-## Environment Variables
8383-8484-You can customize the server configuration using environment variables in `docker-compose.yml`:
8585-8686-- `HOST` - Server host (default: `0.0.0.0`)
8787-- `PORT` - Server port (default: `8000`)
8888-8989-## GraphQL Endpoint
9090-9191-Once running, access the GraphQL endpoint at:
9292-- `http://localhost:8000/graphql`
9393-9494-## Volume Mounts
9595-9696-- `./lexicons:/app/server/priv/lexicons:ro` - Mounts local lexicons directory as read-only
9797-9898-The `:ro` flag makes the mount read-only for security.
9999-100100-## Stopping the Server
101101-102102-```bash
103103-docker compose down
104104-```
105105-106106-## Pulling Latest Image
107107-108108-```bash
109109-docker compose pull
110110-docker compose up -d
111111-```
112112-113113-## Troubleshooting
114114-115115-### Port Already in Use
116116-117117-If port 8000 is already in use, change it in `docker-compose.yml`:
118118-119119-```yaml
120120-ports:
121121- - "3000:8000" # Maps local port 3000 to container port 8000
122122-```
123123-124124-### Lexicons Not Loading
125125-126126-Ensure your lexicon files:
127127-1. Follow the correct directory structure (namespace/path/file.json)
128128-2. Have valid JSON syntax
129129-3. Match the NSID in the filename path
130130-131131-### Viewing Logs
132132-133133-```bash
134134-docker-compose logs -f quickslice
135135-```
-3
example/docker-compose.yml
···55 image: ghcr.io/bigmoves/quickslice:latest
66 ports:
77 - "8000:8000"
88- volumes:
99- # Mount local lexicons directory to /app/priv/lexicons in the container
1010- - ./lexicons:/app/priv/lexicons:ro
118 environment:
129 - HOST=0.0.0.0
1310 - PORT=8000
-31
example/fly.toml
···11-# fly.toml app configuration file generated for quickslice on 2025-10-29T21:49:03-07:00
22-#
33-# See https://fly.io/docs/reference/configuration/ for information about how to use this file.
44-#
55-66-app = 'quickslice'
77-primary_region = 'sjc'
88-99-[build]
1010-1111-[env]
1212- DATABASE_URL = '/data/quickslice.db'
1313- HOST = '0.0.0.0'
1414- PORT = '8080'
1515-1616-[http_service]
1717- internal_port = 8080
1818- force_https = true
1919- auto_stop_machines = 'stop'
2020- auto_start_machines = true
2121- min_machines_running = 1
2222- processes = ['app']
2323-2424-[[mounts]]
2525- source = 'app_data'
2626- destination = '/data'
2727-2828-[[vm]]
2929- memory = '1gb'
3030- cpu_kind = 'shared'
3131- cpus = 1