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

Rewrite in Phoenix #5

Merged
merged 33 commits into from
Dec 6, 2024
Merged

Rewrite in Phoenix #5

merged 33 commits into from
Dec 6, 2024

Conversation

KasperVaessen
Copy link
Collaborator

No description provided.

@KasperVaessen KasperVaessen added the enhancement New feature or request label Dec 5, 2024
@KasperVaessen KasperVaessen self-assigned this Dec 5, 2024
Copy link
Collaborator

@ThomBreugelmans ThomBreugelmans left a comment

Choose a reason for hiding this comment

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

Running the project with Docker results in the following error:

ERROR! Config provider Config.Reader failed with:
** (RuntimeError) environment variable SECRET_KEY_BASE is missing.
You can generate one by calling: mix phx.gen.secret

    /app/releases/0.1.0/runtime.exs:31: (file)
    (elixir 1.17.3) src/elixir.erl:386: :elixir.eval_external_handler/3
    (stdlib 6.1.2) erl_eval.erl:904: :erl_eval.do_apply/7
    (stdlib 6.1.2) erl_eval.erl:648: :erl_eval.expr/6
    (stdlib 6.1.2) erl_eval.erl:271: :erl_eval.exprs/6
    (elixir 1.17.3) src/elixir.erl:364: :elixir.eval_forms/4
    (elixir 1.17.3) lib/module/parallel_checker.ex:112: Module.ParallelChecker.verify/1
    (elixir 1.17.3) lib/code.ex:572: Code.validated_eval_string/3

Runtime terminating during boot ({#{message=><<101,110,118,105,114,111,110,109,101,110,116,32,118,97,114,105,97,98,108,101,32,83,69,67,82,69,84,95,75,69,89,95,66,65,83,69,32,105,115,32,109,105,115,115,105,110,103,46,10,89,111,117,32,99,97,110,32,103,101,110,101,114,97,116,101,32,111,110,101,32,98,121,32,99,97,108,108,105,110,103,58,32,109,105,120,32,112,104,120,46,103,101,110,46,115,101,99,114,101,116,10>>,'__struct__'=>'Elixir.RuntimeError','__exception__'=>true},[{elixir_eval,'__FILE__',1,[{file,"/app/releases/0.1.0/runtime.exs"},{line,31}]},{elixir,eval_external_handler,3,[{file,"src/elixir.erl"},{line,386},{error_info,#{module=>'Elixir.Exception'}}]},{erl_eval,do_apply,7,[{file,"erl_eval.erl"},{line,904}]},{erl_eval,expr,6,[{file,"erl_eval.erl"},{line,648}]},{erl_eval,exprs,6,[{file,"erl_eval.erl"},{line,271}]},{elixir,eval_forms,4,[{file,"src/elixir.erl"},{line,364}]},{'Elixir.Module.ParallelChecker',verify,1,[{file,"lib/module/parallel_checker.ex"},{line,112}]},{'Elixir.Code',validated_eval_string,3,[{

Crash dump is being written to: erl_crash.dump...done

I have supplied the (afaik) required environment variables session and leaderboard_id.

@KasperVaessen
Copy link
Collaborator Author

Running the project with Docker results in the following error:

ERROR! Config provider Config.Reader failed with:
** (RuntimeError) environment variable SECRET_KEY_BASE is missing.
You can generate one by calling: mix phx.gen.secret

    /app/releases/0.1.0/runtime.exs:31: (file)
    (elixir 1.17.3) src/elixir.erl:386: :elixir.eval_external_handler/3
    (stdlib 6.1.2) erl_eval.erl:904: :erl_eval.do_apply/7
    (stdlib 6.1.2) erl_eval.erl:648: :erl_eval.expr/6
    (stdlib 6.1.2) erl_eval.erl:271: :erl_eval.exprs/6
    (elixir 1.17.3) src/elixir.erl:364: :elixir.eval_forms/4
    (elixir 1.17.3) lib/module/parallel_checker.ex:112: Module.ParallelChecker.verify/1
    (elixir 1.17.3) lib/code.ex:572: Code.validated_eval_string/3

Runtime terminating during boot ({#{message=><<101,110,118,105,114,111,110,109,101,110,116,32,118,97,114,105,97,98,108,101,32,83,69,67,82,69,84,95,75,69,89,95,66,65,83,69,32,105,115,32,109,105,115,115,105,110,103,46,10,89,111,117,32,99,97,110,32,103,101,110,101,114,97,116,101,32,111,110,101,32,98,121,32,99,97,108,108,105,110,103,58,32,109,105,120,32,112,104,120,46,103,101,110,46,115,101,99,114,101,116,10>>,'__struct__'=>'Elixir.RuntimeError','__exception__'=>true},[{elixir_eval,'__FILE__',1,[{file,"/app/releases/0.1.0/runtime.exs"},{line,31}]},{elixir,eval_external_handler,3,[{file,"src/elixir.erl"},{line,386},{error_info,#{module=>'Elixir.Exception'}}]},{erl_eval,do_apply,7,[{file,"erl_eval.erl"},{line,904}]},{erl_eval,expr,6,[{file,"erl_eval.erl"},{line,648}]},{erl_eval,exprs,6,[{file,"erl_eval.erl"},{line,271}]},{elixir,eval_forms,4,[{file,"src/elixir.erl"},{line,364}]},{'Elixir.Module.ParallelChecker',verify,1,[{file,"lib/module/parallel_checker.ex"},{line,112}]},{'Elixir.Code',validated_eval_string,3,[{

Crash dump is being written to: erl_crash.dump...done

I have supplied the (afaik) required environment variables session and leaderboard_id.

Ah yes indeed you also need to supply a SECRET_KEY_BASE env variable. I sent you one in private which you can use.

@KasperVaessen KasperVaessen marked this pull request as draft December 5, 2024 22:10
@KasperVaessen KasperVaessen marked this pull request as ready for review December 5, 2024 22:24
@ThomBreugelmans
Copy link
Collaborator

I see, with that SECRET_KEY_BASE it works, what is the use for this environment variable? (would be nice to have this reflected in the README as well so it is known how to run it)
Little side note, if this is required this will need to be added to the cluster config when it is pushed to main so that our cloud instance will be able to run.

lib/aoch.ex Show resolved Hide resolved
@KasperVaessen
Copy link
Collaborator Author

I see, with that SECRET_KEY_BASE it works, what is the use for this environment variable? (would be nice to have this reflected in the README as well so it is known how to run it)

Little side note, if this is required this will need to be added to the cluster config when it is pushed to main so that our cloud instance will be able to run.

This key is used by the Phoenix framework as base for security purposes. Our app has no user interaction, so it might not be 100% neccesary, however it is considered best practise to always include it. I will add it to the readme, just like the other two env variables

@KasperVaessen KasperVaessen merged commit f740f3d into WISVCH:main Dec 6, 2024
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants