Skip to content
Snippets Groups Projects
Verified Commit c47bae97 authored by Nik | Klampfradler's avatar Nik | Klampfradler
Browse files

[Docker] Do not generate a secret key on startup

This would require www-data to be able to write the secret key now.
That would not be an issue in general, but requires awkward changes
with no real use. Users are supposed to configure a secret key
themselves.
parent 28d674a7
No related branches found
No related tags found
1 merge request!556[Docker] Do not generate a secret key on startup
Pipeline #6738 passed
......@@ -52,17 +52,6 @@ prepare_database() {
aleksis-admin createinitialrevisions
}
if [ -z "$ALEKSIS_secret_key" ]; then
# Use a random session secret key if none was provided
# In K8s, should be provided from a K8s secret
if [ ! -e /var/lib/aleksis/secret_key ]; then
touch /var/lib/aleksis/secret_key
chmod 600 /var/lib/aleksis/secret_key
LC_ALL=C tr -dc 'A-Za-z0-9!"#$%&'\''()*+,-./:;<=>?@[\]^_`{|}~' </dev/urandom | head -c 64 >/var/lib/aleksis/secret_key
fi
ALEKSIS_secret_key=$(cat /var/lib/aleksis/secret_key)
fi
# Wait for database to be reachable under all conditions
wait_database
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment