Revolyssup commented on code in PR #548: URL: https://github.com/apache/apisix-docker/pull/548#discussion_r1541839765
########## compose/modify_config.sh: ########## @@ -0,0 +1,13 @@ +#!/bin/sh + +# Generate a random string +random_string=$(head /dev/urandom | tr -dc A-Za-z0-9 | head -c 32) + +# Perform substitution using sed +sed "s/key: ''/key: $random_string/g" /config.yaml > /tmp/temp_config.yaml + +# Copy the content of the temporary file back to the original file +cat /tmp/temp_config.yaml > /config.yaml + +# Remove the temporary file +rm /tmp/temp_config.yaml Review Comment: Directly pushing to config.yaml was giving some errors so i created a temp file -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected]
