Skip to content

Openverse is a search engine for openly-licensed media. This monorepo includes all application code.

Replace docker-compose with docker compose in just scripts and docs (#4017)

Olga Bulate7da5d6f8a61
diff --git a/documentation/catalog/guides/quickstart.md b/documentation/catalog/guides/quickstart.md
index a195b11a4..b30a089b0 100644
--- a/documentation/catalog/guides/quickstart.md
+++ b/documentation/catalog/guides/quickstart.md
@@ -39,8 +39,7 @@ For instructions geared specifically towards production deployments, see
### Requirements
-You'll need `docker` and `docker-compose` installed on your machine, with
-versions new enough to use version `3` of Docker Compose `.yml` files.
+You'll need `docker` with Compose V2 installed on your machine.
You will also need the [`just`](https://github.com/casey/just#installation)
command runner installed.
diff --git a/documentation/frontend/guides/analytics.md b/documentation/frontend/guides/analytics.md
index 902833dfc..266cc112c 100644
--- a/documentation/frontend/guides/analytics.md
+++ b/documentation/frontend/guides/analytics.md
@@ -5,7 +5,7 @@ and use the Openverse Plausible integration. It is not necessary to set up
Plausible for general frontend development unless specifically working on custom
events.
-Running Plausible locally requires Docker and docker-compose.
+Running Plausible locally requires Docker (with Compose V2).
## Plausible set up and first run
diff --git a/documentation/frontend/reference/playwright_tests.md b/documentation/frontend/reference/playwright_tests.md
index 3a56ecdff..cecb48bd9 100644
--- a/documentation/frontend/reference/playwright_tests.md
+++ b/documentation/frontend/reference/playwright_tests.md
@@ -31,8 +31,8 @@ cross-platform browser differences from creating flaky test behavior. We run
both end-to-end and visual-regression tests in the same container to save from
having to run the Nuxt production build twice.
-Having docker and docker-compose is a pre-requisite to running the playwright
-tests locally. Please follow
+Having Docker and Compose V2 is a pre-requisite to running the Playwright tests
+locally. Please follow
[the relevant instructions for your operating system for how to install docker and docker-compose](https://docs.docker.com/get-docker/).
If you're on Windows 10 Home Edition, please note that you'll need to
[install and run docker inside WSL2](https://www.freecodecamp.org/news/how-to-run-docker-on-windows-10-home-edition/).
diff --git a/documentation/meta/maintenance/elasticsearch_cluster.md b/documentation/meta/maintenance/elasticsearch_cluster.md
index ae75f422d..f299c262a 100644
--- a/documentation/meta/maintenance/elasticsearch_cluster.md
+++ b/documentation/meta/maintenance/elasticsearch_cluster.md
@@ -301,7 +301,7 @@ editing process.
1. Run `vim` or `nano` with `sudo` to edit the `docker-compose.yml` and make the
configuration changes identified in the first step of the overall process.
1. Save the changes.
-1. Run `docker-compose up -d` to restart the node with the new settings.
+1. Run `docker compose up -d` to restart the node with the new settings.
1. Mark the node as restarted in the shared document.
1. Monitor the cluster:
diff --git a/ingestion_server/justfile b/ingestion_server/justfile
index 10c082f67..fdaefa289 100644
--- a/ingestion_server/justfile
+++ b/ingestion_server/justfile
@@ -106,8 +106,8 @@ test-local *args:
{{ if IS_CI == "" { "just test-logs > test/ingestion_logs.txt && just test-clean-dc" } else { "" } }}
test-logs:
- docker-compose --profile=ingestion_server -f test/integration-docker-compose.yml logs --no-color
+ docker compose --profile=ingestion_server -f test/integration-docker-compose.yml logs --no-color
# Clean integration test docker-compose stack. Is run after tests are finished locally.
test-clean-dc:
- docker-compose --profile=ingestion_server -f test/integration-docker-compose.yml down -v
+ docker compose --profile=ingestion_server -f test/integration-docker-compose.yml down -v
diff --git a/ingestion_server/test/integration_test.py b/ingestion_server/test/integration_test.py
index dbb904b18..91cafd750 100644
--- a/ingestion_server/test/integration_test.py
+++ b/ingestion_server/test/integration_test.py
@@ -169,7 +169,8 @@ def _compose_cmd(compose_path, cmd: list[str], **kwargs):
"""Run a Docker Compose command"""
cmd = [
- "docker-compose",
+ "docker",
+ "compose",
"--profile",
"ingestion_server",
"-f",
diff --git a/justfile b/justfile
index db091073b..0d693028e 100644
--- a/justfile
+++ b/justfile
@@ -154,10 +154,10 @@ versions:
pgcli_version=$(just api/pgcli-version)
EOF
-# Run `docker-compose` configured with the correct files and environment
+# Run `docker compose` configured with the correct files and environment
dc *args:
@{{ if IS_CI != "" { "just env" } else { "true" } }}
- env COMPOSE_PROFILES="{{ env_var_or_default("COMPOSE_PROFILES", "api,ingestion_server,frontend,catalog") }}" docker-compose {{ DOCKER_FILE }} {{ args }}
+ env COMPOSE_PROFILES="{{ env_var_or_default("COMPOSE_PROFILES", "api,ingestion_server,frontend,catalog") }}" docker compose {{ DOCKER_FILE }} {{ args }}
# Build all (or specified) services
build *args:
diff --git a/setup_plausible.sh b/setup_plausible.sh
index bf439d879..383a0c9d1 100755
--- a/setup_plausible.sh
+++ b/setup_plausible.sh
@@ -4,14 +4,14 @@ PLAUSIBLE_SERVICE_NAME="${PLAUSIBLE_SERVICE_NAME:-plausible}"
PLAUSIBLE_DB_SERVICE_NAME="${PLAUSIBLE_DB_SERVICE_NAME:-plausible_db}"
# Create Plausible user
-docker-compose exec -T "$PLAUSIBLE_SERVICE_NAME" \
+docker compose exec -T "$PLAUSIBLE_SERVICE_NAME" \
/app/bin/plausible rpc \
'Plausible.Auth.User.new(%{name: "Deploy", email: "[email protected]", password: "deploy", password_confirmation: "deploy"}) |> Plausible.Repo.insert'
# Create an API key with '{sites:provision:*}' scope
# API key: aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa (that's 64 times 'a')
# Key hash: SHA256(`SECRET_KEY_BASE` + API key)
-docker-compose exec -T "$PLAUSIBLE_DB_SERVICE_NAME" /bin/bash -c "psql -U deploy -d plausible <<-EOF
+docker compose exec -T "$PLAUSIBLE_DB_SERVICE_NAME" /bin/bash -c "psql -U deploy -d plausible <<-EOF
INSERT INTO api_keys
(id, user_id, name, key_prefix, key_hash, inserted_at, updated_at, scopes, hourly_request_limit)
VALUES