tursodatabase / libsql

libSQL is a fork of SQLite that is both Open Source, and Open Contributions.
https://turso.tech/libsql
MIT License
8.68k stars 230 forks source link

Running the documented Docker Compose build throws an error #1312

Open mpiorowski opened 2 months ago

mpiorowski commented 2 months ago

Straight from docs:

version: "3"
services:
  db:
    image: ghcr.io/tursodatabase/libsql-server:main
    platform: linux/amd64
    ports:
      - "8080:8080"
      - "5001:5001"
    # environment:
    #   - SQLD_NODE=primary
    volumes:
      - ./data/libsql:/var/lib/sqld

Throws Error:

/usr/local/bin/docker-entrypoint.sh: line 18: SQLD_HTTP_AUTH: unbound variable
boreyko1 commented 2 months ago

Adding SQLD_HTTP_AUTH env variable fixes this. Format is basic:$PARAM where $PARAM is base64-encoded string "$USERNAME:$PASSWORD"

Alternatively, one can use latest image tag instead

haaawk commented 2 months ago

@LucioFranco this is the problem I was telling you about few days ago. Is this fixed?

LucioFranco commented 2 months ago

The main image tag isn't very new nor is it used to get anything recent, I recommend using https://github.com/tursodatabase/libsql/pkgs/container/libsql-server these tags so either latest or one of the sha's.

mpiorowski commented 2 months ago

@boreyko1 thx, the latest tags work, shouldn't the doc be changes? Or at least accommodate for the main tag.

haaawk commented 2 months ago

Could you paste a link to the wrong docks @mpiorowski please?

mpiorowski commented 2 months ago

@haaawk https://github.com/tursodatabase/libsql/blob/main/docs/DOCKER.md

haaawk commented 2 months ago

Thanks!