Skip to content

Commit

Permalink
Invoke the compose plugin with docker compose
Browse files Browse the repository at this point in the history
This is part of compose v2, and the new and preferred way of invocation, and
the old (with hyphen) is not available everywhere, e.g. some Linux systems
don't provide something to allow for invoking `docker-compose`with hyphen.
https://docs.docker.com/compose/migrate/#what-are-the-differences-between-compose-v1-and-compose-v2
  • Loading branch information
friedelwolff committed May 27, 2024
1 parent 0bc6da1 commit ed0498f
Showing 1 changed file with 24 additions and 24 deletions.
48 changes: 24 additions & 24 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -26,51 +26,51 @@ list:

up:
clear
@docker-compose up
@docker compose up

upd:
clear
@docker-compose up -d
@docker compose up -d

build:
clear
@docker-compose build
@docker compose build

stop:
clear
@docker-compose stop
@docker compose stop

down:
clear
@docker-compose down
@docker compose down

restart:
clear
@docker-compose restart
@docker compose restart

make-migrations:
clear
@docker-compose run --rm web python manage.py makemigrations
@docker compose run --rm web python manage.py makemigrations

migrate:
clear
@docker-compose run --rm web python manage.py migrate
@docker compose run --rm web python manage.py migrate

collectstatic:
clear
@docker-compose run --rm web python manage.py collectstatic --noinput
@docker compose run --rm web python manage.py collectstatic --noinput

shell:
clear
@docker-compose run --rm web python manage.py shell
@docker compose run --rm web python manage.py shell

logs:
clear
@docker-compose logs -tf
@docker compose logs -tf

create-super-user:
clear
@docker-compose run --rm web python manage.py createsuperuser
@docker compose run --rm web python manage.py createsuperuser

docker-stop-all:
clear
Expand All @@ -79,30 +79,30 @@ docker-stop-all:

create-schema:
clear
@docker-compose run --rm web python manage.py graph_models -a -o schema/schema.png
@docker compose run --rm web python manage.py graph_models -a -o schema/schema.png

test:
clear
@docker-compose run --rm web python manage.py test
@docker compose run --rm web python manage.py test

ruff-check:
clear
@docker-compose run --rm web ruff check .
@docker compose run --rm web ruff check .

ruff-format:
clear
@docker-compose run --rm web ruff format .
@docker compose run --rm web ruff format .

ruff-fix:
clear
@docker-compose run --rm web ruff check --fix .
@docker compose run --rm web ruff check --fix .

load-fixtures:
clear
@docker-compose run --rm web python manage.py loaddata fixtures/institution.json
@docker-compose run --rm web python manage.py loaddata fixtures/projects.json
@docker-compose run --rm web python manage.py loaddata fixtures/language.json
@docker-compose run --rm web python manage.py loaddata fixtures/subjects.json
@docker compose run --rm web python manage.py loaddata fixtures/institution.json
@docker compose run --rm web python manage.py loaddata fixtures/projects.json
@docker compose run --rm web python manage.py loaddata fixtures/language.json
@docker compose run --rm web python manage.py loaddata fixtures/subjects.json

pre-commit-install:
clear
Expand All @@ -121,12 +121,12 @@ docker-shell:

check:
clear
@docker-compose run --rm web python manage.py check
@docker compose run --rm web python manage.py check

make-messages:
clear
@docker-compose run --rm web python manage.py makemessages --all
@docker compose run --rm web python manage.py makemessages --all

compile-messages:
clear
@docker-compose run --rm web python manage.py compilemessages
@docker compose run --rm web python manage.py compilemessages

0 comments on commit ed0498f

Please sign in to comment.