D
Dokploy9mo ago
Bunny

Multiline variables

I need to provide RSA key for one of my services(https://docs.saleor.io/setup/configuration#rsa_private_key) I generated key via openssl genrsa -out private-key.pem 3072 Converted to one liner via awk 'NF {sub(/\r/, ""); printf "%s\\n",$0;}' private-key.pem But on deploy getting an error
failed to read /etc/dokploy/compose/replaced/code/.env: line 28: unexpected character "/" in variable name "MIIG/gIBADANBgkqhkiG9w0BAQEFAASCBugwggbkAgEAAoIBgQC1e4KKUt+roWLY"
Error
failed to read /etc/dokploy/compose/replaced/code/.env: line 28: unexpected character "/" in variable name "MIIG/gIBADANBgkqhkiG9w0BAQEFAASCBugwggbkAgEAAoIBgQC1e4KKUt+roWLY"
Error
How I can add variables like this?
Environment Variables | Saleor Commerce Documentation
Saleor follows the 12-factor approach, so you can configure Saleor using environment variables.
6 Replies
TheLetslook
TheLetslook9mo ago
Try to escape this symbol: \/
Bunny
BunnyOP9mo ago
I viewed file via cat, and there is no quotes, I think problem in that
No description
Siumauricio
Siumauricio9mo ago
Try to make the value be in a single line
Bunny
BunnyOP9mo ago
It's already one liner, in portainer I just wrapped it in double quotes
Siumauricio
Siumauricio9mo ago
Hmm weird, in one of my projects I’m using a private key and I put in a single line and it works fine
Bunny
BunnyOP9mo ago
Sounds strange, but I wrapped it in double quotes and single quotes '"here_is_my_private_key"' and it works 😂

Did you find this page helpful?