ai-town Docker & Self-Hosted Deployment

GitHub

A MIT-licensed, deployable starter kit for building and customizing your own version of AI town - a virtual town where AI characters live, chat and socialize.

10,662 stars TypeScript TypeScript 3 files ยท ~8,260 tokens
RAW Compose
1. Pull Image (GHCR) docker pull ghcr.io/get-convex/convex-backend:latest
2. Docker Run (1-Click Launch) docker run -d --name ai-town -p 5173:5173 --restart always ghcr.io/get-convex/convex-backend:latest
3. Podman Run podman run -d --name ai-town -p 5173:5173 --restart always ghcr.io/get-convex/convex-backend:latest
4. Skopeo Inspect (Zero-Pull Manifest) skopeo inspect docker://ghcr.io/get-convex/convex-backend:latest
5. ORAS Pull (OCI Artifact) oras pull ghcr.io/get-convex/convex-backend:latest
6. Compose Deployment docker compose up -d
docker-compose.yml
Download .yml
version: '3.8'

services:
  frontend:
    build: .
    ports:
      - '5173:5173'
    volumes:
      - .:/usr/src/app
      - /usr/src/app/node_modules
    environment:
      - VITE_CONVEX_URL=http://127.0.0.1:${PORT:-3210}
    networks:
      - ai-town-network
  backend:
    image: ghcr.io/get-convex/convex-backend:latest
    ports:
      - '${PORT:-3210}:3210'
      - '${SITE_PROXY_PORT:-3211}:3211'
      - '${OLLAMA_PORT:-11434}:11434'
    volumes:
      - data:/convex/data
    environment:
      - INSTANCE_NAME=${INSTANCE_NAME:-}
      - INSTANCE_SECRET=${INSTANCE_SECRET:-}
      - CONVEX_RELEASE_VERSION_DEV=${CONVEX_RELEASE_VERSION_DEV:-}
      - ACTIONS_USER_TIMEOUT_SECS=${ACTIONS_USER_TIMEOUT_SECS:-}
      - CONVEX_CLOUD_ORIGIN=${URL_BASE:-http://127.0.0.1}:${PORT:-3210}
      - CONVEX_SITE_ORIGIN=${URL_BASE:-http://127.0.0.1}:${SITE_PROXY_PORT:-3211}
      - DATABASE_URL=${DATABASE_URL:-}
    healthcheck:
      test: curl -f http://localhost:3210/version
      interval: 5s
      start_period: 5s
    networks:
      - ai-town-network

  dashboard:
    image: ghcr.io/get-convex/convex-dashboard:latest
    ports:
      - '${DASHBOARD_PORT:-6791}:6791'
    environment:
      - NEXT_PUBLIC_DEPLOYMENT_URL=http://127.0.0.1:${PORT:-3210}
    depends_on:
      backend:
        condition: service_healthy

volumes:
  data:

networks:
  ai-town-network:
    driver: bridge