Skip to content

Commit

Permalink
Use Docker Compose V2 (#88)
Browse files Browse the repository at this point in the history
## Ticket

Resolves #33

## Changes

Updates all references to `docker-compose` to `docker compose`.
  • Loading branch information
michael-wojcik committed Nov 13, 2023
1 parent 670aaa6 commit 0d1f1de
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 8 deletions.
12 changes: 6 additions & 6 deletions app/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -87,21 +87,21 @@ setup-local:
##################################################

build:
docker-compose build
docker compose build

start:
docker-compose up --detach
docker compose up --detach

run-logs: start
docker-compose logs --follow --no-color $(APP_NAME)
docker compose logs --follow --no-color $(APP_NAME)

init: build init-db

clean-volumes: ## Remove project docker volumes (which includes the DB state)
docker-compose down --volumes
docker compose down --volumes

stop:
docker-compose down
docker compose down

check: format-check lint test

Expand All @@ -118,7 +118,7 @@ check: format-check lint test
init-db: start-db db-migrate

start-db:
docker-compose up --detach main-db
docker compose up --detach main-db
./bin/wait-for-local-db.sh

## Destroy current DB, setup new one
Expand Down
4 changes: 2 additions & 2 deletions app/src/logging/decodelog.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
#
# Make JSON logs easier to read when developing or troubleshooting.
#
# Expects JSON log lines or `docker-compose log` output on stdin and outputs plain text lines on
# Expects JSON log lines or `docker compose log` output on stdin and outputs plain text lines on
# stdout.
#
# This module intentionally has no dependencies outside the standard library so that it can be run
Expand Down Expand Up @@ -42,7 +42,7 @@ def process_line(line: str) -> Optional[str]:
# JSON format
return decode_json_line(line)
elif "| {" in line:
# `docker-compose logs ...` format
# `docker compose logs ...` format
return decode_json_line(line[line.find("| {") + 2 :])
# Anything else is left alone
return line
Expand Down

0 comments on commit 0d1f1de

Please sign in to comment.