Skip to content

Auto Generation of django secret key#2232

Open
IdirLISN wants to merge 7 commits intodevelopfrom
feature/random_secret_key
Open

Auto Generation of django secret key#2232
IdirLISN wants to merge 7 commits intodevelopfrom
feature/random_secret_key

Conversation

@IdirLISN
Copy link
Collaborator

@IdirLISN IdirLISN commented Mar 5, 2026

Description:

Generation of a random secret key for django instance when building the app.
Write the value on .env.
each docker compose up -d, entrypoint.sh will read the variable in .env, if it doesn't exist it will generate one random secret key.
If a user want to deploy his own codabench instance, it will be secured with a unique secret key.
Enables django to use a private secret key for each new instance of it.

Issues this PR resolves

Secret key was clear and was the same for all instances. It means all codabench instances can authenticate to each other.

A checklist for hand testing

  • just deploy and start the app. If it works, it means django found the secret key randomly generated.

Checklist

  • Code review by me
  • Hand tested by me
  • I'm proud of my work
  • Code review by reviewer
  • Hand tested by reviewer
  • CircleCi tests are passing
  • Ready to merge

@IdirLISN IdirLISN changed the title feature Ok, .env modification needed Auto Generation of django secret key Mar 5, 2026
@Didayolo
Copy link
Member

The CircleCI tests are failing

Error response from daemon: Container e1b459a9a774a3304902586c6bb054308ae2ac6c61a91d656a474a6b30233e3a is restarting, wait until the container is running

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

Successfully merging this pull request may close these issues.

2 participants