Skip to content

Commit

Permalink
Fixing pull-start.sh
Browse files Browse the repository at this point in the history
  • Loading branch information
marcleblanc2 committed Mar 15, 2024
1 parent 139ee45 commit 528c44b
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions repo-converter/pull-start.sh
Original file line number Diff line number Diff line change
Expand Up @@ -13,9 +13,14 @@ log_file="$repo_converter_dir/pull-start.log"
date_time=$(date +"%F %T")
echo "$date_time - Starting $0" >> "$log_file"

command="git -C $repo_converter_dir pull && docker compose -f $repo_converter_dir/docker-compose.yaml pull && docker compose -f $repo_converter_dir/docker-compose.yaml up -d --remove-orphans"
command="\
sudo git -C $repo_converter_dir reset --hard && \
sudo git -C $repo_converter_dir pull --force && \
sudo docker compose -f $repo_converter_dir/docker-compose.yaml pull && \
sudo docker compose -f $repo_converter_dir/docker-compose.yaml up -d --remove-orphans \
"

bash -c "$command" >> "$log_file" 2>&1
sudo bash -c "$command" 2>&1 | sudo tee -a file "$log_file"

date_time=$(date +"%F %T")
echo "$date_time - Finishing $0" >> "$log_file"

0 comments on commit 528c44b

Please sign in to comment.