From 48967cc0329957b129efb120c3e4a940352c7e69 Mon Sep 17 00:00:00 2001 From: Roger Gonzalez Date: Sat, 21 Oct 2023 16:58:45 -0300 Subject: Added custom docker-compose file --- docker-compose.custom.yaml | 4 ++++ docs.org | 7 +++++-- install.sh | 7 +++++-- yams | 2 +- 4 files changed, 15 insertions(+), 5 deletions(-) create mode 100644 docker-compose.custom.yaml diff --git a/docker-compose.custom.yaml b/docker-compose.custom.yaml new file mode 100644 index 0000000..a108a1c --- /dev/null +++ b/docker-compose.custom.yaml @@ -0,0 +1,4 @@ +version: "3" + +services: + # Add your custom services here! diff --git a/docs.org b/docs.org index 921522f..bedb28b 100644 --- a/docs.org +++ b/docs.org @@ -180,6 +180,7 @@ install_location=${install_location:-/opt/yams} [[ -f "$install_location" ]] || mkdir -p "$install_location" || send_error_message "There was an error with your install location! Make sure the directory exists and the user \"$USER\" has permissions on it" install_location=$(realpath "$install_location") filename="$install_location/docker-compose.yaml" +custom_file_filename="$install_location/docker-compose.custom.yaml" env_file="$install_location/.env" read -p "What's the user that is going to own the media server files? [$USER]: " username @@ -313,6 +314,7 @@ echo "Copying $filename..." cp docker-compose.example.yaml "$filename" || send_error_message "Your user ($USER) needs to have permissions on the installation folder!" cp .env.example "$env_file" || send_error_message "Your user ($USER) needs to have permissions on the installation folder!" +cp docker-compose.custom.yaml "$custom_file_filename" || send_error_message "Your user ($USER) needs to have permissions on the installation folder!" #+end_src ** Set PUID, PGID, Media Folder, Media Service, Config folder and VPN @@ -352,8 +354,9 @@ fi :END: #+begin_src bash -sed -i -e "s;;$filename;g" yams -sed -i -e "s;;$install_location;g" yams +sed -i -e "s;;$filename;g" yams \ + -e "s;;$custom_file_filename;g" yams \ + -e "s;;$install_location;g" yams #+end_src ** Success message! diff --git a/install.sh b/install.sh index 07c3d9e..6619a96 100644 --- a/install.sh +++ b/install.sh @@ -77,6 +77,7 @@ install_location=${install_location:-/opt/yams} [[ -f "$install_location" ]] || mkdir -p "$install_location" || send_error_message "There was an error with your install location! Make sure the directory exists and the user \"$USER\" has permissions on it" install_location=$(realpath "$install_location") filename="$install_location/docker-compose.yaml" +custom_file_filename="$install_location/docker-compose.custom.yaml" env_file="$install_location/.env" read -p "What's the user that is going to own the media server files? [$USER]: " username @@ -178,6 +179,7 @@ echo "Copying $filename..." cp docker-compose.example.yaml "$filename" || send_error_message "Your user ($USER) needs to have permissions on the installation folder!" cp .env.example "$env_file" || send_error_message "Your user ($USER) needs to have permissions on the installation folder!" +cp docker-compose.custom.yaml "$custom_file_filename" || send_error_message "Your user ($USER) needs to have permissions on the installation folder!" sed -i -e "s//$puid/g" "$env_file" \ -e "s//$pgid/g" "$env_file" \ @@ -203,8 +205,9 @@ if [ "$setup_vpn" == "y" ]; then -e "s;#- 8080:8080/tcp # gluetun;- 8080:8080/tcp # gluetun;g" "$filename" fi -sed -i -e "s;;$filename;g" yams -sed -i -e "s;;$install_location;g" yams +sed -i -e "s;;$filename;g" yams \ + -e "s;;$custom_file_filename;g" yams \ + -e "s;;$install_location;g" yams send_success_message "Everything installed correctly! 🎉" diff --git a/yams b/yams index 0f103d4..db49e83 100755 --- a/yams +++ b/yams @@ -2,7 +2,7 @@ set -euo pipefail -dc="docker-compose -f " +dc="docker-compose -f -f " install_location="" option=${1:-"--help"} -- cgit v1.2.3