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

Secret key formatting chokes the Docker compose build #3572

Open
danielrosehill opened this issue May 8, 2024 · 1 comment
Open

Secret key formatting chokes the Docker compose build #3572

danielrosehill opened this issue May 8, 2024 · 1 comment
Labels
needs: troubleshooting Issues that we can't reproduce or need to investigate further before picking a course of action needs: user feedback We are waiting for a user to answer questions or provide feedback on our fix type: bug Something isn't working user reported Reported by a Mathesar user work: installation
Milestone

Comments

@danielrosehill
Copy link

Hey!

Not sure if this issue is widespread, but (in my environment) I wasn't able to run docker compose (and not docker-compose) with the way the SECRET_KEY variable was set out:

image

I followed the template on the site which has this as the guidance for passing the variable:

-config: &config
  # (REQUIRED) Replace '?' with '-' followed by a 50 character random string.
  # You can generate one at https://djecrety.ir/ or by running:
  #   echo $(cat /dev/urandom | LC_CTYPE=C tr -dc 'a-zA-Z0-9' | head -c 50)
  SECRET_KEY: ${SECRET_KEY:?}

I was also a little surprised to see the domain suggested for generating the string!

@danielrosehill danielrosehill added needs: triage This issue has not yet been reviewed by a maintainer type: bug Something isn't working labels May 8, 2024
@seancolsen
Copy link
Contributor

Hi @danielrosehill, thanks for reporting this.

I've been trying to reproduce it, but I'm having a hard time.

This error message in your screenshot is helpful:

yaml: line 38: mapping values are not allowed in this context

Based on that message, I have a hunch that your docker-compose.yml file has a syntax error which is causing the YAML parser to fail. I tried a bunch of different values for SECRET_KEY in hopes of recreating your error message, but I wasn't able to.

Would it be possible for you to fiddle with your SECRET_KEY value such that you're still seeing this error while also having a value that you'd be comfortable sharing with us? If we could get to a point where we could see the exact code in your docker-compose.yml file, that would really help us troubleshoot this problem.

You said:

I followed the template on the site which has this as the guidance for passing the variable:

I'd be curious to understand exactly what steps you took here. It sounds like you're not comfortable generating the secret key from a website, which I can understand. Did you choose to generate one by running the command we recommend? Or did you generate one by some other means? Understanding this would help us with troubleshooting your problem as well as improving our documentation.

@seancolsen seancolsen added needs: user feedback We are waiting for a user to answer questions or provide feedback on our fix needs: troubleshooting Issues that we can't reproduce or need to investigate further before picking a course of action work: installation and removed needs: triage This issue has not yet been reviewed by a maintainer labels May 9, 2024
@seancolsen seancolsen added this to the Backlog milestone May 9, 2024
@seancolsen seancolsen added the user reported Reported by a Mathesar user label May 9, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
needs: troubleshooting Issues that we can't reproduce or need to investigate further before picking a course of action needs: user feedback We are waiting for a user to answer questions or provide feedback on our fix type: bug Something isn't working user reported Reported by a Mathesar user work: installation
Projects
None yet
Development

No branches or pull requests

2 participants