tweak(rnd): Use docker compose not docker-compose (#8034)

* use docker compose not docker-compose

* linting
This commit is contained in:
Aarushi
2024-09-11 10:20:31 +01:00
committed by GitHub
parent e81d9f9f0b
commit 1d9b01fc77
2 changed files with 7 additions and 5 deletions

View File

@@ -101,7 +101,7 @@ docker compose down
If you run into issues with dangling orphans, try:
```sh
docker-compose down --volumes --remove-orphans && docker-compose up --force-recreate --renew-anon-volumes --remove-orphans
docker compose down --volumes --remove-orphans && docker-compose up --force-recreate --renew-anon-volumes --remove-orphans
```
## Testing

View File

@@ -8,7 +8,8 @@ def wait_for_postgres(max_retries=5, delay=5):
try:
result = subprocess.run(
[
"docker-compose",
"docker",
"compose",
"-f",
"docker-compose.test.yaml",
"exec",
@@ -45,7 +46,8 @@ def test():
# Start PostgreSQL with Docker Compose
run_command(
[
"docker-compose",
"docker",
"compose",
"-f",
"docker-compose.test.yaml",
"up",
@@ -55,7 +57,7 @@ def test():
)
if not wait_for_postgres():
run_command(["docker-compose", "-f", "docker-compose.test.yaml", "down"])
run_command(["docker", "compose", "-f", "docker-compose.test.yaml", "down"])
sys.exit(1)
# Run Prisma migrations
@@ -64,6 +66,6 @@ def test():
# Run the tests
result = subprocess.run(["pytest"] + sys.argv[1:], check=False)
run_command(["docker-compose", "-f", "docker-compose.test.yaml", "down"])
run_command(["docker", "compose", "-f", "docker-compose.test.yaml", "down"])
sys.exit(result.returncode)