From a1098adb38e5a36e6f73f35124c94e1d1a7e6382 Mon Sep 17 00:00:00 2001 From: Nick Phura Date: Mon, 12 Aug 2024 11:00:02 -0700 Subject: [PATCH] Update docker commands from 'docker-compose ...' to 'docker compose ...' --- Makefile | 42 +++++++++++++++++++++--------------------- 1 file changed, 21 insertions(+), 21 deletions(-) diff --git a/Makefile b/Makefile index 31f78ed505..bda1b8262a 100644 --- a/Makefile +++ b/Makefile @@ -46,13 +46,13 @@ close: ## Closes all project containers @echo "===============================================" @echo "Make: close - closing Docker containers" @echo "===============================================" - @docker-compose -f docker-compose.yml down + @docker compose -f docker-compose.yml down clean: ## Closes and cleans (removes) all project containers @echo "===============================================" @echo "Make: clean - closing and cleaning Docker containers" @echo "===============================================" - @docker-compose -f docker-compose.yml down -v --rmi all --remove-orphans + @docker compose -f docker-compose.yml down -v --rmi all --remove-orphans prune: ## Deletes ALL docker artifacts (even those not associated to this project) @echo -n "Delete ALL docker artifacts? [y/n] " && read ans && [ $${ans:-n} = y ] @@ -77,13 +77,13 @@ build-postgres: ## Builds the postgres db containers @echo "===============================================" @echo "Make: build-postgres - building postgres db images" @echo "===============================================" - @docker-compose -f docker-compose.yml build db db_setup + @docker compose -f docker-compose.yml build db db_setup run-postgres: ## Runs the postgres db containers @echo "===============================================" @echo "Make: run-postgres - running postgres db images" @echo "===============================================" - @docker-compose -f docker-compose.yml up -d db db_setup + @docker compose -f docker-compose.yml up -d db db_setup ## ------------------------------------------------------------------------------ ## Build/Run Backend Commands @@ -94,13 +94,13 @@ build-backend: ## Builds all backend containers @echo "===============================================" @echo "Make: build-backend - building backend images" @echo "===============================================" - @docker-compose -f docker-compose.yml build db db_setup api + @docker compose -f docker-compose.yml build db db_setup api run-backend: ## Runs all backend containers @echo "===============================================" @echo "Make: run-backend - running backend images" @echo "===============================================" - @docker-compose -f docker-compose.yml up -d db db_setup api + @docker compose -f docker-compose.yml up -d db db_setup api ## ------------------------------------------------------------------------------ ## Build/Run Backend+Web Commands (backend + web frontend) @@ -111,13 +111,13 @@ build-web: ## Builds all backend+web containers @echo "===============================================" @echo "Make: build-web - building web images" @echo "===============================================" - @docker-compose -f docker-compose.yml build db db_setup api app + @docker compose -f docker-compose.yml build db db_setup api app run-web: ## Runs all backend+web containers @echo "===============================================" @echo "Make: run-web - running web images" @echo "===============================================" - @docker-compose -f docker-compose.yml up -d db db_setup api app + @docker compose -f docker-compose.yml up -d db db_setup api app ## ------------------------------------------------------------------------------ ## Commands to shell into the target container @@ -128,19 +128,19 @@ db-container: ## Executes into database container. @echo "Make: Shelling into database container" @echo "===============================================" @export PGPASSWORD=$(DB_ADMIN_PASS) - @docker-compose exec db psql -U $(DB_ADMIN) -d $(DB_DATABASE) + @docker compose exec db psql -U $(DB_ADMIN) -d $(DB_DATABASE) app-container: ## Executes into the app container. @echo "===============================================" @echo "Shelling into app container" @echo "===============================================" - @docker-compose exec app bash + @docker compose exec app bash api-container: ## Executes into the api container. @echo "===============================================" @echo "Shelling into api container" @echo "===============================================" - @docker-compose exec api bash + @docker compose exec api bash ## ------------------------------------------------------------------------------ ## Database migration commands @@ -150,37 +150,37 @@ build-db-setup: ## Build the db knex setup (migrations + seeding) image @echo "===============================================" @echo "Make: build-db-setup - building db knex setup image" @echo "===============================================" - @docker-compose -f docker-compose.yml build db_setup + @docker compose -f docker-compose.yml build db_setup run-db-setup: ## Run the database migrations and seeding @echo "===============================================" @echo "Make: run-db-setup - running database migrations and seeding" @echo "===============================================" - @docker-compose -f docker-compose.yml up db_setup + @docker compose -f docker-compose.yml up db_setup build-db-migrate: ## Build the db knex migrations image @echo "===============================================" @echo "Make: build-db-migrate - building db knex migrate image" @echo "===============================================" - @docker-compose -f docker-compose.yml build db_migrate + @docker compose -f docker-compose.yml build db_migrate run-db-migrate: ## Run the database migrations @echo "===============================================" @echo "Make: run-db-migrate - running database migrations" @echo "===============================================" - @docker-compose -f docker-compose.yml up db_migrate + @docker compose -f docker-compose.yml up db_migrate build-db-rollback: ## Build the db knex rollback image @echo "===============================================" @echo "Make: build-db-rollback - building db knex rollback image" @echo "===============================================" - @docker-compose -f docker-compose.yml build db_rollback + @docker compose -f docker-compose.yml build db_rollback run-db-rollback: ## Rollback the latest database migrations @echo "===============================================" @echo "Make: run-db-rollback - rolling back the latest database migrations" @echo "===============================================" - @docker-compose -f docker-compose.yml up db_rollback + @docker compose -f docker-compose.yml up db_rollback ## ------------------------------------------------------------------------------ ## clamav commands @@ -190,13 +190,13 @@ build-clamav: ## Build the clamav image @echo "===============================================" @echo "Make: build-clamav - building clamav image" @echo "===============================================" - @docker-compose -f docker-compose.yml build clamav + @docker compose -f docker-compose.yml build clamav run-clamav: ## Run clamav @echo "===============================================" @echo "Make: run-clamav - running clamav" @echo "===============================================" - @docker-compose -f docker-compose.yml up -d clamav + @docker compose -f docker-compose.yml up -d clamav ## ------------------------------------------------------------------------------ ## Run `npm` commands for all projects @@ -314,11 +314,11 @@ pipeline-install: ## Runs `npm install` for all projects args ?= --tail 2000 ## Default args if none are provided -log: ## Runs `docker-compose logs -f` for all containers +log: ## Runs `docker compose logs -f` for all containers @echo "===============================================" @echo "Running docker logs for the app container" @echo "===============================================" - @docker-compose logs -f $(args) + @docker compose logs -f $(args) log-app: ## Runs `docker logs -f` for the app container @echo "==============================================="