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

Docker compose fails #93

Closed
thenitai opened this issue Feb 24, 2024 · 8 comments
Closed

Docker compose fails #93

thenitai opened this issue Feb 24, 2024 · 8 comments

Comments

@thenitai
Copy link

The latest docker compose on here fails. Replacing the plausible pull with plausible/analytics:v2.0 makes it work again.

@ruslandoga
Copy link
Contributor

👋 @thenitai

Could you explain a bit more please? The current docker-compose.yml uses plausible/analytics:v2.0

@thenitai
Copy link
Author

Look at the v2.1 branch. The plausible link in the docker-compose file doesn't work

@ruslandoga
Copy link
Contributor

Ah, thank you! I've updated it to a release candidate.

@xiaohanyu
Copy link

Hello, I use v2.1.0 branch's docker-compose.yml and it reports with following error:

docker-compose -f compose.production.yml logs -f plausible
plausible-plausible-1  | ERROR! Config provider Config.Reader failed with:
plausible-plausible-1  | ** (ArgumentError) incorrect padding
plausible-plausible-1  |     (elixir 1.16.0) lib/base.ex:735: Base.decode64base!/2
plausible-plausible-1  |     /app/releases/0.0.1/runtime.exs:163: (file)
plausible-plausible-1  |     (elixir 1.16.0) src/elixir.erl:405: :elixir.eval_external_handler/3
plausible-plausible-1  |     (stdlib 5.2) erl_eval.erl:750: :erl_eval.do_apply/7
plausible-plausible-1  |     (stdlib 5.2) erl_eval.erl:1026: :erl_eval.expr_list/7
plausible-plausible-1  |     (stdlib 5.2) erl_eval.erl:456: :erl_eval.expr/6
plausible-plausible-1  |     (stdlib 5.2) erl_eval.erl:539: :erl_eval.expr/6
plausible-plausible-1  |     (stdlib 5.2) erl_eval.erl:325: :erl_eval.expr/6
plausible-plausible-1  |
plausible-plausible-1  |
plausible-plausible-1  | Runtime terminating during boot ({#{message=><<"incorrect padding">>,'__struct__'=>'Elixir.ArgumentError','__exception__'=>true},[{'Elixir.Base','decode64base!',2,[{file,"lib/base.ex"},{l
ine,735}]},{elixir_eval,'__FILE__',1,[{file,"/app/releases/0.0.1/runtime.exs"},{line,163}]},{elixir,eval_external_handler,3,[{file,"src/elixir.erl"},{line,405}]},{erl_eval,do_apply,7,[{file,"erl_eval.erl"},{line,
750}]},{erl_eval,expr_list,7,[{file,"erl_eval.erl"},{line,1026}]},{erl_eval,expr,6,[{file,"erl_eval.erl"},{line,456}]},{erl_eval,expr,6,[{file,"erl_eval.erl"},{line,539}]},{erl_eval,expr,6,[{file,"erl_eval.erl"},
{line,325}]}]})
plausible-plausible-1  |
plausible-plausible-1  | Crash dump is being written to: erl_crash.dump...done
plausible-plausible-1  | ERROR! Config provider Config.Reader failed with:
plausible-plausible-1  | ** (ArgumentError) incorrect padding
plausible-plausible-1  |     (elixir 1.16.0) lib/base.ex:735: Base.decode64base!/2
plausible-plausible-1  |     /app/releases/0.0.1/runtime.exs:163: (file)
plausible-plausible-1  |     (elixir 1.16.0) src/elixir.erl:405: :elixir.eval_external_handler/3
plausible-plausible-1  |     (stdlib 5.2) erl_eval.erl:750: :erl_eval.do_apply/7
plausible-plausible-1  |     (stdlib 5.2) erl_eval.erl:1026: :erl_eval.expr_list/7
plausible-plausible-1  |     (stdlib 5.2) erl_eval.erl:456: :erl_eval.expr/6
plausible-plausible-1  |     (stdlib 5.2) erl_eval.erl:539: :erl_eval.expr/6
plausible-plausible-1  |     (stdlib 5.2) erl_eval.erl:325: :erl_eval.expr/6
plausible-plausible-1  |

v2.0 works well.

Just FYI.

@ruslandoga

@ruslandoga
Copy link
Contributor

ruslandoga commented Feb 26, 2024

👋 @xiaohanyu

Your TOTP_VAULT_KEY (added in v2.1.0) seems to be invalid, more info on it is in the "Quick start" https://github.com/plausible/community-edition/tree/v2.1.0#quick-start section of the guide.

The error comes from https://github.com/plausible/analytics/blob/cc867396b237c10ea996783844dc19e3e110aa73/config/runtime.exs#L163

@xiaohanyu
Copy link

@ruslandoga works like a charm after change TOTP_VAULT_KEY to be 32 chars long.

May I know why it mandates 32 chars for TOTP_VAULT_KEY?

Meanwhile, I suggest to declare this requirements in the doc to avoid future confusions.

@ruslandoga
Copy link
Contributor

Meanwhile, I suggest to declare this requirements in the doc to avoid future confusions.

Right, will do! Thank you for the suggestions.

May I know why it mandates 32 chars for TOTP_VAULT_KEY?

@zoldar could help with this one out please?

@zoldar
Copy link

zoldar commented May 8, 2024

May I know why it mandates 32 chars for TOTP_VAULT_KEY?

This requirement comes from the library we use for vaulting the TOTP secrets in the database (so that they remain encrypted "at rest") - Cloak. This in turn is caused by specific requirements for AES key used for encryption and decryption in the underlying core OTP :crypto API.

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

4 participants