Hi I am trying to start kratos following the quick...
# talk-kratos
f
Hi I am trying to start kratos following the quickstart guide, but unfortunately found it doesn't work. I have seen this issue here: https://github.com/ory/kratos/issues/1945 And this is the command I am using right now:
Copy code
git clone <https://github.com/ory/kratos.git>
cd kratos
git checkout v0.8.0-alpha.3
docker-compose -f quickstart.yml -f quickstart-standalone.yml up --build --force-recreate
But then I get this:
Copy code
kratos-migrate_1              | time=2021-11-24T19:17:49Z level=debug msg=Connecting to SQL Database audience=application connMaxLifetime=0s idlePool=4 pool=8 service_name=Ory Kratos service_version=v0.8.0-alpha.3
kratos-migrate_1              | time=2021-11-24T19:17:49Z level=warning msg=Unable to ping database, retrying. audience=application error=map[message:unable to open database file: no such file or directory] service_name=Ory Kratos service_version=v0.8.0-alpha.3
kratos_1                      | time=2021-11-24T19:17:51Z level=debug msg=Connecting to SQL Database func=<http://github.com/ory/kratos/driver.(*RegistryDefault).Init.func1|github.com/ory/kratos/driver.(*RegistryDefault).Init.func1> file=/home/ory/driver/registry_default.go:518 audience=application connMaxLifetime=0s idlePool=4 pool=8 service_name=Ory Kratos service_version=v0.8.0-alpha.3
kratos_1                      | time=2021-11-24T19:17:51Z level=warning msg=Unable to ping database, retrying. func=<http://github.com/ory/kratos/driver.(*RegistryDefault).Init.func1|github.com/ory/kratos/driver.(*RegistryDefault).Init.func1> file=/home/ory/driver/registry_default.go:545 audience=application error=map[message:unable to open database file: no such file or directory trace:
Which I believe
sqlite
should be started by docker. Have I missed anything there?
h
Which OS are you on?
f
I am in NixOS
docker-compose version 1.29.2, build unknown
Copy code
[nix-shell:~/kratos]$ uname -a
Linux nixos 5.15.2 #1-NixOS SMP Fri Nov 12 14:05:52 UTC 2021 x86_64 GNU/Linux
h
I think there were some issues with some security kernel modules and docker not able to mount volumes
f
I haven't set anything to harden my kernel, and I haven't bump into something like this previously. Thats weird.
yeah and you don't need the courier / SMTP as long as you have verification and recovery disabled
or you can also just set it to something random like smtps://idonotexist
you'll end up with some errors in your logs maybe but for dev it's fine
f
Wait no with selinux compose file, I am still getting the same error(cannot ping database). I think security that might not be the issue there.
I am able to connect to the database when I use postgres, but seems like the migration script are written in sqlite?
Copy code
kratos_1                      | time=2021-11-24T22:21:46Z level=debug msg=Ignoring migration file 20210410175418000074_network.sqlite3.down.sql because dialect is not supported: unsupported dialect sqlite3 func=<http://github.com/ory/x/popx.(*MigrationBox).findMigrations.func1|github.com/ory/x/popx.(*MigrationBox).findMigrations.func1> file=/go/pkg/mod/github.com/ory/x@v0.0.300/popx/migration_box.go:98 audience=application service_name=Ory Kratos service_version=v0.8.0-alpha.3
This is my
docker-compose.yml
Copy code
version: "3.7"

services:
  kratos-selfservice-ui-node:
    image: oryd/kratos-selfservice-ui-node:v0.8.0-alpha.3
    environment:
      - KRATOS_PUBLIC_URL=<http://kratos:4433/>
      - KRATOS_BROWSER_URL=<http://127.0.0.1:4433/>

  kratos-migrate:
    image: oryd/kratos:v0.8.0-alpha.3
    environment:
      - DSN=<postgres://kratos:secret@postgresd:5433/kratos?sslmode=disable&max_conns=20&max_idle_conns=4>
      - LOG_LEVEL=trace
    command: -c /etc/config/kratos/kratos.yml migrate sql -e --yes
    volumes:
      - type: bind
        source: ./kratos
        target: /etc/kratos

  kratos:
    image: oryd/kratos:v0.8.0-alpha.3
    depends_on:
      - kratos-migrate
    ports:
      - "4433:4433" # public
      - "4434:4434" # admin
    environment:
      - DSN=<postgres://kratos:secret@postgresd:5433/kratos?sslmode=disable&max_conns=20&max_idle_conns=4>
      - LOG_LEVEL=trace
    command: serve -c /etc/kratos/kratos.yml --dev --watch-courier
    volumes:
      - type: bind
        source: ./kratos
        target: /etc/kratos

  postgresd:
    image: postgres:9.6
    ports:
      - "5433:5432"
    environment:
      - POSTGRES_USER=kratos
      - POSTGRES_PASSWORD=secret
      - POSTGRES_DB=kratos