Skip to content

Commit

Permalink
chore: Update Makefile to Compose v2 (#7)
Browse files Browse the repository at this point in the history
  • Loading branch information
creaturenex authored Feb 20, 2024
1 parent 048942b commit 64102d1
Showing 1 changed file with 8 additions and 8 deletions.
16 changes: 8 additions & 8 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -3,33 +3,33 @@ VOLUME=$(shell basename $(PWD))
develop: clean build migrations.all run

clean:
docker-compose rm -vf
docker compose rm -vf

build:
docker-compose build
docker compose build

run:
docker-compose up
docker compose up

shell:
docker-compose run django \
docker compose run django \
sh

python-shell:
docker-compose run django \
docker compose run django \
poetry run python src/manage.py shell

postgres.data.delete: clean
docker volume rm $(VOLUME)_postgres

postgres.start:
docker-compose up -d postgres
docker-compose exec postgres \
docker compose up -d postgres
docker compose exec postgres \
sh -c 'while ! nc -z postgres 5432; do sleep 0.1; done'

postgres-shell: postgres.start
docker exec -it $(VOLUME)_postgres_1 sh

migrations.all: postgres.start
docker-compose run django \
docker compose run django \
poetry run python src/manage.py migrate

0 comments on commit 64102d1

Please sign in to comment.