# Degoog + PostgreSQL indexer backend. # Good for: busy public instances where the SQLite indexer gets slow at scale. # Postgres handles concurrent writes better and scales the full-text search further. # # Setup: # mkdir -p ./data && sudo chown -R 1000:1000 ./data # Change POSTGRES_PASSWORD below before starting. # Set DEGOOG_SETTINGS_PASSWORDS before exposing this instance to the internet. services: degoog: image: atcr.io/pandadev.net/degoog:latest volumes: - ./data:/app/data ports: - "4444:4444" restart: unless-stopped environment: # Leave both unset only for trusted local/LAN use. If this instance is # reachable from the internet, SET A PASSWORD: an unlocked instance lets # anyone install extensions, which runs code on the server. # DEGOOG_SETTINGS_PASSWORDS: "set-a-strong-password-here" # When "true", every admin and store action stays behind the password # above even on a local network. DEGOOG_PUBLIC_INSTANCE: "false" # Behind a reverse proxy, set this to the public URL so links such as # /opensearch.xml use https. # DEGOOG_BASE_URL: "https://search.example.com" DEGOOG_POSTGRES: "postgresql://degoog:changeme@degoog-postgres:5432/degoog" # Instead of the URL above, you can pass separate values. Useful when # your deployment hands you credentials as individual keys, such as a # Kubernetes secret (CNPG, bjw-s app-template). DEGOOG_POSTGRES wins # when both are set, so drop it to use these. # A HOST starting with / is a unix socket (peer auth, no password), # which a URL cannot express. See the docs for details. # DEGOOG_POSTGRES_HOST: "degoog-postgres" # DEGOOG_POSTGRES_PORT: "5432" # DEGOOG_POSTGRES_USER: "degoog" # DEGOOG_POSTGRES_PASSWORD: "changeme" # DEGOOG_POSTGRES_DATABASE: "degoog" depends_on: degoog-postgres: condition: service_healthy degoog-postgres: image: postgres:17-alpine restart: unless-stopped environment: POSTGRES_DB: degoog POSTGRES_USER: degoog POSTGRES_PASSWORD: changeme volumes: - postgres-data:/var/lib/postgresql/data user: "70:70" cap_drop: - ALL security_opt: - no-new-privileges:true healthcheck: test: ["CMD-SHELL", "pg_isready -U degoog -d degoog"] interval: 5s timeout: 5s retries: 10 start_period: 10s volumes: postgres-data: