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

Dockerized laravel app exits on passport:keys artisan command #1537

Closed
Sanguigui opened this issue Mar 28, 2022 · 4 comments
Closed

Dockerized laravel app exits on passport:keys artisan command #1537

Sanguigui opened this issue Mar 28, 2022 · 4 comments

Comments

@Sanguigui
Copy link

  • Passport Version: 10.3.3
  • Laravel Version: 8.83.5
  • PHP Version: 7.3
  • Database Driver & Version:

Description:

Upgrading to version 10 of passport causes my docker container to exit because the command passport:keys returns a 0 or a 1.

In docker a return of 0 means "Absence of an attached process in the foreground" and 1 means "failure due to application error".
It seems this has been added as part of a PR #1509 to update tests and wasn't present in the previous version.

Steps To Reproduce:

I unfortunately couldn't show any code but you could try:

  • Dockerize a Laravel v8 app
  • Add Passport v10 to it
  • Follow documentation's instruction up until deploying passport and running the artisan command passport:keys
@driesvints
Copy link
Member

Unsure what you mean as I've always knows 0 to be a success code and 1 to be a failure. The current code seems correct to me.

@Sanguigui
Copy link
Author

I don't think it is incorrect, I think this is a side effect to the adding af the return statement.
I was surprised return statements were added where they weren't any before.

In my config on starting the container I use an entrypoint to execute a few php commands, this is why docker reads the return statement.

With few more tests it is failing because it is returning a 1 when keys are already there. We were using the passport:keys command to generate keys if none are there, I guess I'll have to check key existence before running the command now

@driesvints
Copy link
Member

I really don't see an issue sorry.

@Sanguigui
Copy link
Author

I guess my mistake for using the passport:keys error output when a key exists as a test

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants