|
| 1 | +# claudable docker deployment guide |
| 2 | + |
| 3 | +## quick start - one click run |
| 4 | + |
| 5 | +### prerequisites |
| 6 | +- docker and docker compose installed |
| 7 | +- claude api key from anthropic |
| 8 | + |
| 9 | +### 1. pull and run (easiest method) |
| 10 | + |
| 11 | +```bash |
| 12 | +# pull the latest image |
| 13 | +docker pull ghcr.io/opactorai/claudable:latest |
| 14 | + |
| 15 | +# run with your api key |
| 16 | +docker run -d \ |
| 17 | + -p 3000:3000 \ |
| 18 | + -p 8080:8080 \ |
| 19 | + -e ANTHROPIC_API_KEY="your-claude-api-key-here" \ |
| 20 | + -v claudable-data:/app/data \ |
| 21 | + --name claudable \ |
| 22 | + ghcr.io/opactorai/claudable:latest |
| 23 | +``` |
| 24 | + |
| 25 | +### 2. using docker compose |
| 26 | + |
| 27 | +create a `.env` file: |
| 28 | +```bash |
| 29 | +ANTHROPIC_API_KEY=your-claude-api-key-here |
| 30 | +``` |
| 31 | + |
| 32 | +create `docker-compose.yml`: |
| 33 | +```yaml |
| 34 | +version: '3.8' |
| 35 | + |
| 36 | +services: |
| 37 | + claudable: |
| 38 | + image: ghcr.io/opactorai/claudable:latest |
| 39 | + ports: |
| 40 | + - "3000:3000" |
| 41 | + - "8080:8080" |
| 42 | + environment: |
| 43 | + - ANTHROPIC_API_KEY=${ANTHROPIC_API_KEY} |
| 44 | + volumes: |
| 45 | + - claudable-data:/app/data |
| 46 | + restart: unless-stopped |
| 47 | + |
| 48 | +volumes: |
| 49 | + claudable-data: |
| 50 | +``` |
| 51 | +
|
| 52 | +run: |
| 53 | +```bash |
| 54 | +docker compose up -d |
| 55 | +``` |
| 56 | + |
| 57 | +## access the application |
| 58 | + |
| 59 | +- **frontend**: http://localhost:3000 |
| 60 | +- **api**: http://localhost:8080 |
| 61 | +- **api docs**: http://localhost:8080/docs |
| 62 | + |
| 63 | +## build from source |
| 64 | + |
| 65 | +```bash |
| 66 | +# clone repository |
| 67 | +git clone https://github.com/opactorai/claudable.git |
| 68 | +cd claudable |
| 69 | + |
| 70 | +# build image |
| 71 | +docker build -t claudable:local . |
| 72 | + |
| 73 | +# run with docker compose |
| 74 | +docker compose up -d |
| 75 | +``` |
| 76 | + |
| 77 | +## environment variables |
| 78 | + |
| 79 | +| variable | description | required | default | |
| 80 | +|----------|-------------|----------|---------| |
| 81 | +| `ANTHROPIC_API_KEY` | claude api key for ai functionality | yes | - | |
| 82 | +| `NEXT_PUBLIC_API_URL` | backend api url | no | http://localhost:8080 | |
| 83 | +| `API_PORT` | api server port | no | 8080 | |
| 84 | +| `WEB_PORT` | web server port | no | 3000 | |
| 85 | + |
| 86 | +## data persistence |
| 87 | + |
| 88 | +the sqlite database is stored in `/app/data` inside the container. to persist data: |
| 89 | + |
| 90 | +```bash |
| 91 | +# named volume (recommended) |
| 92 | +docker run -v claudable-data:/app/data ... |
| 93 | + |
| 94 | +# or bind mount |
| 95 | +docker run -v $(pwd)/data:/app/data ... |
| 96 | +``` |
| 97 | + |
| 98 | +## stopping and removing |
| 99 | + |
| 100 | +```bash |
| 101 | +# stop container |
| 102 | +docker stop claudable |
| 103 | + |
| 104 | +# remove container |
| 105 | +docker rm claudable |
| 106 | + |
| 107 | +# remove image |
| 108 | +docker rmi ghcr.io/opactorai/claudable:latest |
| 109 | +``` |
| 110 | + |
| 111 | +## troubleshooting |
| 112 | + |
| 113 | +### ports already in use |
| 114 | +change the port mapping: |
| 115 | +```bash |
| 116 | +docker run -p 3001:3000 -p 8081:8080 ... |
| 117 | +``` |
| 118 | + |
| 119 | +### permission issues |
| 120 | +ensure the data directory has correct permissions: |
| 121 | +```bash |
| 122 | +docker exec claudable chown -R nextjs:nodejs /app/data |
| 123 | +``` |
| 124 | + |
| 125 | +### api connection issues |
| 126 | +verify the api is accessible: |
| 127 | +```bash |
| 128 | +docker logs claudable |
| 129 | +curl http://localhost:8080/docs |
| 130 | +``` |
| 131 | + |
| 132 | +## security notes |
| 133 | + |
| 134 | +- **never commit** your `.env` file with api keys |
| 135 | +- use docker secrets for production deployments |
| 136 | +- regularly update the base image for security patches |
| 137 | +- consider using a reverse proxy for production |
| 138 | + |
| 139 | +## support |
| 140 | + |
| 141 | +- github issues: https://github.com/opactorai/claudable/issues |
| 142 | +- discord: https://discord.gg/njnbafhnqc |
0 commit comments