Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

refactor: quickstart.yml #2086

Closed
wants to merge 2 commits into from
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion quickstart.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ services:
- type: bind
source: ./contrib/quickstart/kratos/email-password
target: /etc/config/kratos
command: -c /etc/config/kratos/kratos.yml migrate sql -e --yes
command: serve -c /etc/config/kratos/kratos.yml migrate sql -e --yes
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The command written there is correct. serve ... migrate is not a valid command, and it will fail. What problem are you encountering or trying to solve?

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Apologies in advance, I'm a new user and I was following the guide at https://www.ory.sh/kratos/docs/guides/docker/ to spin up a docker instance. My objective was merely to successfully spin up an instance.

Using that link as reference I tried to run this code in powershell

docker run `
-it `
-e DSN="memory"  `
--mount type=bind,source="$(pwd)",target=/etc/config/kratos `
oryd/kratos:latest-sqlite `
--config /etc/config/kratos/kratos.yml

The output was

Error: unknown flag: --config
Usage:
  kratos [command]

Available Commands:
  completion  generate the autocompletion script for the specified shell
  courier     Commands related to the Ory Kratos message courier
  hashers     This command contains helpers around hashing
  help        Help about any command
  identities  Tools to interact with remote identities
  jsonnet     Helpers for linting and formatting JSONNet code
  migrate     Various migration helpers
  remote      Helpers and management for remote Ory Kratos instances
  serve       Run the Ory Kratos server
  version     Show the build version, build time, and git hash

Flags:
  -h, --help   help for kratos

Use "kratos [command] --help" for more information about a command.

unknown flag: --config

Then I referred quickstart.yml trying to find a working code. Noticed line 41 had a 'serve' and I successfully spin up an instance as well

docker run `
-it `
-e DSN="memory"  `
--mount type=bind,source="$(pwd)",target=/etc/config/kratos `
oryd/kratos:v0.8.0-alpha.3-sqlite `
serve --config /etc/config/kratos/kratos.yml

And then I wrongly assumed line 16 was wrong based on my experience and made this pull request, my apologies. I was confused by this inconsistency of commands between two supposedly similar docker images. I ran the serve ... migrate code and indeed it gave an 'unknown shorthand 'e' in -e' error.

restart: on-failure
networks:
- intranet
Expand Down