Skip to content

Commit

Permalink
Replace docker-compose command with docker compose & update `time…
Browse files Browse the repository at this point in the history
…` dep to fix build error (#1218)
  • Loading branch information
LukasKalbertodt authored Aug 7, 2024
2 parents 4f9dfb2 + 0eaaa3f commit 4deb15b
Show file tree
Hide file tree
Showing 5 changed files with 14 additions and 14 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -213,7 +213,7 @@ jobs:
- name: Start docker containers
working-directory: util/containers
run: |
docker-compose -f docker-compose.yml up -d \
docker compose -f docker-compose.yml up -d \
tobira-login-handler \
tobira-meilisearch \
tobira-ui-test-files
Expand Down
8 changes: 4 additions & 4 deletions backend/Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions util/scripts/check-system.sh
Original file line number Diff line number Diff line change
Expand Up @@ -67,8 +67,8 @@ fi
echo
echo "Checking additional/optional tools for Tobira development..."

printf "▸ docker-compose installed?"
if has_command docker-compose; then
printf "▸ docker compose installed?"
if has_command docker && docker compose &> /dev/null; then
print_yes
else
print_no
Expand Down
6 changes: 3 additions & 3 deletions util/scripts/db-load-dump.sh
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,8 @@ if ! command -v xz &> /dev/null; then
>&2 echo "'xz' is not installed!"
exit 1
fi
if ! command -v docker-compose &> /dev/null; then
>&2 echo "'docker-compose' is not installed! (Also see './x.sh check-system')"
if ! (command -v docker &> /dev/null && docker compose &> /dev/null); then
>&2 echo "'docker compose' is not installed! (Also see './x.sh check-system')"
exit 1
fi

Expand All @@ -27,7 +27,7 @@ echo "To cancel, ctrl+c! To continue, press enter."
read -r

set -x
docker-compose -f "$basedir/../containers/docker-compose.yml" \
docker compose -f "$basedir/../containers/docker-compose.yml" \
exec -T tobira-dev-database \
pg_restore \
--dbname 'postgresql://tobira:tobira@localhost/postgres' \
Expand Down
8 changes: 4 additions & 4 deletions x.sh
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ if [[ $# -lt 1 ]]; then
>&2 echo
>&2 echo " - ./x.sh containers [start|stop|run]"
>&2 echo " Manages all dev containers. To only start/stop some of them, use"
>&2 echo " docker-compose manually in 'util/containers'"
>&2 echo " docker compose manually in 'util/containers'"
>&2 echo
>&2 echo " - ./x.sh db load-dump"
>&2 echo " Loads a public DB dump with lots of data."
Expand All @@ -41,12 +41,12 @@ fi

# Manage the dev containers
containers() {
if ! command -v docker-compose &> /dev/null; then
>&2 echo "'docker-compose' is not installed! (Also see './x.sh check-system')"
if ! (command -v docker &> /dev/null && docker compose &> /dev/null); then
>&2 echo "'docker compose' is not installed! (Also see './x.sh check-system')"
exit 1
fi

docker_command="docker-compose -f $basedir/util/containers/docker-compose.yml"
docker_command="docker compose -f $basedir/util/containers/docker-compose.yml"
case "$1" in
"start")
(set -x; $docker_command up -d)
Expand Down

0 comments on commit 4deb15b

Please sign in to comment.