Docker Compose for Typesense

Typesense search engine. Open-source alternative to Algolia.

typesense search api
compose.yaml
services:
  typesense:
    image: typesense/typesense:latest
    ports:
      - target: 8108
        mode: ingress
    environment:
      - TYPESENSE_API_KEY=${TYPESENSE_API_KEY}
      - TYPESENSE_DATA_DIR=/data
    healthcheck:
      test:
        - CMD
        - curl
        - -f
        - http://localhost:8108/health
      interval: 30s
      timeout: 5s
      retries: 3
    deploy:
      resources:
        reservations:
          cpus: "0.5"
          memory: 256M
    restart: unless-stopped

Services

  • typesense typesense/typesense:latest

Deploy

$ npx defang@latest compose up

Learn more about Defang