Commit 7d01c49f authored by Vladimir Bashkirtsev's avatar Vladimir Bashkirtsev

Fixed generation of config.yaml

parent d90453d3
...@@ -11,28 +11,28 @@ SECRET_KEY=`/sbin/uci -q get s3.credentials.secretkey` ...@@ -11,28 +11,28 @@ SECRET_KEY=`/sbin/uci -q get s3.credentials.secretkey`
if [ ! -z "$SERVER" ] && [ ! -z "$DATABASE" ] && [ ! -z "$AUTH_SECRET_KEY" ] && [ ! -z "$ACCESS_KEY" ] && [ ! -z "$SECRET_KEY" ]; then if [ ! -z "$SERVER" ] && [ ! -z "$DATABASE" ] && [ ! -z "$AUTH_SECRET_KEY" ] && [ ! -z "$ACCESS_KEY" ] && [ ! -z "$SECRET_KEY" ]; then
echo "---" > /run/lakefs/config.yaml echo "---" > /run/lakefs/config.yaml
echo "database:" > /run/lakefs/config.yaml echo "database:" >> /run/lakefs/config.yaml
echo " type: \"postgres\"" > /run/lakefs/config.yaml echo " type: \"postgres\"" >> /run/lakefs/config.yaml
echo " postgres:" > /run/lakefs/config.yaml echo " postgres:" >> /run/lakefs/config.yaml
if [ ! -z "$USER" ] && [ ! -z "$PASSWORD" ]; then if [ ! -z "$USER" ] && [ ! -z "$PASSWORD" ]; then
echo " connection_string: postgresql://$USER:$PASSWORD@$SERVER/$DATABASE" > /run/lakefs/config.yaml echo " connection_string: postgresql://$USER:$PASSWORD@$SERVER/$DATABASE" >> /run/lakefs/config.yaml
else else
echo " connection_string: postgresql://$SERVER/$DATABASE" > /run/lakefs/config.yaml echo " connection_string: postgresql://$SERVER/$DATABASE" >> /run/lakefs/config.yaml
fi fi
echo "auth:" > /run/lakefs/config.yaml echo "auth:" >> /run/lakefs/config.yaml
echo " encrypt:" > /run/lakefs/config.yaml echo " encrypt:" >> /run/lakefs/config.yaml
echo " secret_key: $AUTH_SECRET_KEY" > /run/lakefs/config.yaml echo " secret_key: $AUTH_SECRET_KEY" >> /run/lakefs/config.yaml
echo "blockstore:" > /run/lakefs/config.yaml echo "blockstore:" >> /run/lakefs/config.yaml
echo " type: s3" > /run/lakefs/config.yaml echo " type: s3" >> /run/lakefs/config.yaml
echo " s3:" > /run/lakefs/config.yaml echo " s3:" >> /run/lakefs/config.yaml
echo " force_path_style: true" > /run/lakefs/config.yaml echo " force_path_style: true" >> /run/lakefs/config.yaml
if [ ! -z "$S3_URI" ]; then if [ ! -z "$S3_URI" ]; then
echo " endpoint: $S3_URI" > /run/lakefs/config.yaml echo " endpoint: $S3_URI" >> /run/lakefs/config.yaml
fi fi
echo " discover_bucket_region: false" > /run/lakefs/config.yaml echo " discover_bucket_region: false" >> /run/lakefs/config.yaml
echo " credentials:" > /run/lakefs/config.yaml echo " credentials:" >> /run/lakefs/config.yaml
echo " access_key_id: \"$ACCESS_KEY\"" > /run/lakefs/config.yaml echo " access_key_id: \"$ACCESS_KEY\"" >> /run/lakefs/config.yaml
echo " secret_access_key: \"$SECRET_KEY\"" > /run/lakefs/config.yaml echo " secret_access_key: \"$SECRET_KEY\"" >> /run/lakefs/config.yaml
else else
exit 1 exit 1
fi fi
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment