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

Make PASSKIT_ env variables not mandatory #34

Open
dzirtusss opened this issue May 17, 2024 · 1 comment
Open

Make PASSKIT_ env variables not mandatory #34

dzirtusss opened this issue May 17, 2024 · 1 comment

Comments

@dzirtusss
Copy link

dzirtusss commented May 17, 2024

Making PASSKIT_... variables mandatory makes Docker flow very strange:

RUN RAILS_ENV=production \
    NODE_ENV=production \
    PASSKIT_WEB_SERVICE_HOST=https://example.com \
    PASSKIT_CERTIFICATE_KEY=NOT_USED_NON_BLANK \
    PASSKIT_PRIVATE_P12_CERTIFICATE=NOT_USED_NON_BLANK \
    PASSKIT_APPLE_INTERMEDIATE_CERTIFICATE=NOT_USED_NON_BLANK \
    PASSKIT_APPLE_TEAM_IDENTIFIER=NOT_USED_NON_BLANK \
    PASSKIT_PASS_TYPE_IDENTIFIER=NOT_USED_NON_BLANK \
    bundle exec rails assets:precompile

Because those variables should not exists and/or be injected into Dockerfile. But, just because they are mandatory, assets:precompile crashes with error. However, on practice, they are not used at all by assets compilation.

As well a bit similar situation is with say db:migrate, which may crash in envs w/o such vars (again some simple one-off containers w/o full env).

I guess any other type of solution may be ok (later "normal" run errors, log warnigns, etc), but not the crash of the rails app if env is missing. I mean no any other gem in my memory seems to have such behaviour.

Thanks.

@dzirtusss dzirtusss changed the title Make PASSKEY_ env variables not mandatory Make PASSKIT_ env variables not mandatory May 19, 2024
@coorasse
Copy link
Owner

Yes, I agree. Maybe you have a bit of time to help and start from #5 ? This would solve the issue I believe

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