Skip to content

Commit

Permalink
Switching to latest (#20)
Browse files Browse the repository at this point in the history
  • Loading branch information
marcleblanc2 authored Feb 23, 2024
1 parent d1065c1 commit ed7aaa3
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 5 deletions.
2 changes: 1 addition & 1 deletion repo-converter/docker-compose.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ services:

repo-converter:
container_name: repo-converter
image: ghcr.io/sourcegraph/implementation-bridge-repo-converter:main
image: ghcr.io/sourcegraph/implementation-bridge-repo-converter:latest
volumes:
- ../config/repos-to-convert.yaml:/sourcegraph/repos-to-convert.yaml:ro
- ../config/toprc:/root/.config/procps/toprc
Expand Down
14 changes: 10 additions & 4 deletions repo-converter/pull-start.sh
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,16 @@
# so that the running container is only x minutes/hours behind the latest version of the docker-compose.yaml file, and the Docker image tagged latest in GitHub packages

# crontab -e
# */10 * * * * sudo bash /sourcegraph/implementation-bridges/repo-converter/pull-start.sh >> /sourcegraph/implementation-bridges/repo-converter/pull-start.log 2>&1
# */10 * * * * sudo bash /sourcegraph/implementation-bridges/repo-converter/pull-start.sh

repo_converter_path="/sourcegraph/implementation-bridges/repo-converter"
sg_root_dir="/sourcegraph"
log_file="$repo_converter_dir/pull-start.log"

git -C $repo_converter_path pull
repo_converter_dir="$sg_root_dir/implementation-bridges/repo-converter"

docker compose -f $repo_converter_path/docker-compose.yaml up -d
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 up -d"

bash -c "$command" >> "$log_file" 2>&1

0 comments on commit ed7aaa3

Please sign in to comment.