Ctrl K
ComunidadGuías…

docker-compose.yml

Rama main · réplica de lectura del repositorio original.

Archivo original ↗Preguntar a KiBot
version: "3.8"

# Set OPENVIKING_PUBLIC_BASE_URL in a `.env` file next to this compose file
# when you need public HTTPS (OAuth, MCP clients on the internet).
#
#   .env example for local-only (leave unset or empty):
#     # no .env needed — just `docker compose up -d`
#
#   .env example for a custom OpenViking port:
#     OPENVIKING_SERVER_PORT=2000
#
#   .env example for public HTTPS:
#     OPENVIKING_PUBLIC_BASE_URL=https://ov.your-domain.com
#     OV_ACME_EMAIL=admin@your-domain.com
#
# See docs/en/guides/12-public-access.md for the full walkthrough.

services:
  openviking:
    # Prefer ghcr.io. If it is hard to reach, use the mirror:
    #   image: openviking-cn-beijing.cr.volces.com/volcengine/openviking:latest
    image: ghcr.io/volcengine/openviking:latest
    container_name: openviking
    # Direct access (optional — caddy:1934 is the recommended single entry
    # point). Comment this out once Caddy is your only ingress.
    ports:
      - "${OPENVIKING_SERVER_PORT:-1933}:${OPENVIKING_SERVER_PORT:-1933}"
    volumes:
      - ~/.openviking:/app/.openviking
    environment:
      # Set OPENVIKING_GATEWAY_ENABLED=true in .env to run the gateway on this port.
      OPENVIKING_GATEWAY_ENABLED: ${OPENVIKING_GATEWAY_ENABLED:-}
      OPENVIKING_GATEWAY_MANAGEMENT_KEY: ${OPENVIKING_GATEWAY_MANAGEMENT_KEY:-}
      # Only read once, to migrate data stored by the v0.5.0 gateway.
      OPENVIKING_GATEWAY_ENCRYPTION_KEY: ${OPENVIKING_GATEWAY_ENCRYPTION_KEY:-}
      OPENVIKING_PUBLIC_BASE_URL: ${OPENVIKING_PUBLIC_BASE_URL:-}
      OPENVIKING_SERVER_PORT: ${OPENVIKING_SERVER_PORT:-1933}
    healthcheck:
      test: ["CMD", "openviking-entrypoint", "--healthcheck"]
      interval: 30s
      timeout: 5s
      retries: 3
      start_period: 30s
    restart: unless-stopped

  # Legacy reverse proxy — port 1934 is retained for existing deployments.
  # New setups can connect directly to openviking:1933.
  #
  # For public HTTPS: edit the Caddyfile to add a domain block, set
  # OPENVIKING_PUBLIC_BASE_URL in .env, uncomment the 80/443 port lines
  # below, and add the caddy volumes at the bottom.
  caddy:
    image: caddy:2
    container_name: openviking-caddy
    restart: unless-stopped
    ports:
      - "1934:1934"
      # Uncomment for public HTTPS (after adding a domain block to Caddyfile):
      # - "80:80"
      # - "443:443"
    volumes:
      - ./Caddyfile:/etc/caddy/Caddyfile:ro
      # Uncomment for public HTTPS (Caddy stores certs here):
      # - caddy_data:/data
      # - caddy_config:/config
    environment:
      OPENVIKING_PUBLIC_BASE_URL: ${OPENVIKING_PUBLIC_BASE_URL:-}
      OPENVIKING_SERVER_PORT: ${OPENVIKING_SERVER_PORT:-1933}
      OV_ACME_EMAIL: ${OV_ACME_EMAIL:-}
    depends_on:
      - openviking

# Uncomment for public HTTPS:
# volumes:
#   caddy_data:
#   caddy_config: