Skip to content

Commit edc6cec

Browse files
Migrate to docker compose plugin
1 parent c5341a0 commit edc6cec

File tree

7 files changed

+10
-10
lines changed

7 files changed

+10
-10
lines changed

.github/workflows/tests.yml

+2-2
Original file line numberDiff line numberDiff line change
@@ -64,8 +64,8 @@ jobs:
6464
export $(find ./docker_config -name "*.env" -exec egrep -v '^#' {} \; | xargs)
6565
./control.py start
6666
docker ps
67-
docker-compose ps
68-
docker-compose logs -f initializer
67+
docker compose ps
68+
docker compose logs -f initializer
6969
python tests/wait_for_start.py
7070
./control.py rd ps
7171
env | sort

cli/base/print_tokens.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
@click.command('print_tokens', help='Print team tokens')
88
def print_tokens():
99
command = [
10-
'docker-compose',
10+
'docker', 'compose',
1111
'-f', FULL_COMPOSE_PATH,
1212
'exec', '-T', 'ticker',
1313
'python3', '/app/scripts/print_tokens.py',

cli/base/reset.py

+2-2
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
def reset():
1010
utils.print_bold('Trying to wipe the database')
1111
command = [
12-
'docker-compose',
12+
'docker', 'compose',
1313
'-f', constants.FULL_COMPOSE_PATH,
1414
'run', 'initializer',
1515
'python3', '/app/scripts/reset_db.py',
@@ -23,7 +23,7 @@ def reset():
2323

2424
utils.print_bold('Bringing down services')
2525
command = [
26-
'docker-compose',
26+
'docker', 'compose',
2727
'-f', constants.FULL_COMPOSE_PATH,
2828
'down', '-v',
2929
'--remove-orphans',

cli/base/run_docker.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66

77
@click.command(
88
'rd',
9-
help='Run docker-compose command with correct compose files',
9+
help='Run docker compose command with correct compose files',
1010
context_settings=dict(
1111
ignore_unknown_options=True,
1212
),

cli/utils.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -135,7 +135,7 @@ def get_output(command: List[str], cwd=None, env=None) -> str:
135135

136136
def run_docker(args: List[str]):
137137
base = [
138-
'docker-compose',
138+
'docker', 'compose',
139139
'-f', constants.BASE_COMPOSE_FILE,
140140
]
141141

scripts/run_tests.sh

+2-2
Original file line numberDiff line numberDiff line change
@@ -10,8 +10,8 @@ export $(find ./docker_config -name "*.env" -exec egrep -v '^#' {} \; | xargs)
1010
./control.py build
1111
./control.py start
1212
docker ps
13-
docker-compose ps
14-
docker-compose logs -f initializer
13+
docker compose ps
14+
docker compose logs -f initializer
1515
python tests/wait_for_start.py
1616
./control.py rd ps
1717
env | sort

tests/wait_for_start.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ def wait_for_initializer():
2929
result = int(subprocess.check_output(command).decode().strip())
3030
if result != 0:
3131
print(f'Error in container {name}')
32-
subprocess.run(['docker-compose', 'logs'], cwd=PROJECT_DIR)
32+
subprocess.run(['docker', 'compose', 'logs'], cwd=PROJECT_DIR)
3333
sys.exit(1)
3434

3535

0 commit comments

Comments
 (0)