You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
$ git clone https://github.com/TeamPiped/Piped-Docker
$ cd Piped-Docker
$ ./configure-instance.sh
Enter a hostname for the Frontend (eg: piped.kavin.rocks):
piped.example.xyz
Enter a hostname for the Backend (eg: pipedapi.kavin.rocks):
piped-api.example.xyz
Enter a hostname for the Proxy (eg: pipedproxy.kavin.rocks):
piped-proxy.example.xyz
Enter the reverse proxy you would like to use (either caddy or nginx):
caddy
sed: 1: "config//pipedfrontend.conf": command c expects \ followed by text
sed: 1: "config//pipedfrontend.conf": command c expects \ followed by text
sed: 1: "config//pipedfrontend.conf": command c expects \ followed by text
sed: 1: "config/docker-compose.c ...": command c expects \ followed by text
I was able to fix it by modifying the configure-instance.sh script:
#!/bin/shecho"Enter a hostname for the Frontend (eg: piped.kavin.rocks):"&&read -r frontend
echo"Enter a hostname for the Backend (eg: pipedapi.kavin.rocks):"&&read -r backend
echo"Enter a hostname for the Proxy (eg: pipedproxy.kavin.rocks):"&&read -r proxy
echo"Enter the reverse proxy you would like to use (either caddy or nginx):"&&read -r reverseproxy
rm -rf config/
rm -f docker-compose.yml
cp -r template/ config/
conffiles=$(find config -type f ! -name '*.yml')
sed -i ''"s/FRONTEND_HOSTNAME/$frontend/g"$conffiles
sed -i ''"s/BACKEND_HOSTNAME/$backend/g"$conffiles
sed -i ''"s/PROXY_HOSTNAME/$proxy/g"$conffiles
sed -i ''"s/BACKEND_HOSTNAME_PLACEHOLDER/$backend/g" config/*.yml
mv config/docker-compose.$reverseproxy.yml docker-compose.yml
Why was it not working? Per Chat GPT:
Use Portable sed Syntax: The -i option in sed can behave differently on different systems (e.g., macOS vs Linux). To make it more portable, especially on macOS, you might need to provide an empty string for the backup extension:
sed -i '' "s/FRONTEND_HOSTNAME/$frontend/g" $conffiles
sed -i '' "s/BACKEND_HOSTNAME/$backend/g" $conffiles
sed -i '' "s/PROXY_HOSTNAME/$proxy/g" $conffiles
sed -i '' "s/BACKEND_HOSTNAME_PLACEHOLDER/$backend/g" config/*.yml
On Linux, the -i option can be used without a backup extension:
sed -i "s/FRONTEND_HOSTNAME/$frontend/g" $conffiles
sed -i "s/BACKEND_HOSTNAME/$backend/g" $conffiles
sed -i "s/PROXY_HOSTNAME/$proxy/g" $conffiles
sed -i "s/BACKEND_HOSTNAME_PLACEHOLDER/$backend/g" config/*.yml
The text was updated successfully, but these errors were encountered:
I am following the guide here:
I ran the following commands:
I was able to fix it by modifying the
configure-instance.sh
script:Why was it not working? Per Chat GPT:
The text was updated successfully, but these errors were encountered: