Skip to content

Commit

Permalink
chore: Update Makefile to Compose v2 (#14)
Browse files Browse the repository at this point in the history
  • Loading branch information
creaturenex authored Feb 20, 2024
1 parent 849bdcc commit dd11249
Showing 1 changed file with 12 additions and 12 deletions.
24 changes: 12 additions & 12 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -3,46 +3,46 @@ VOLUME=$(shell basename $(PWD))
develop: clean build migrations.upgrade run

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

build:
docker-compose build
docker compose build

run:
docker-compose up
docker compose up

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

backend-shell:
docker-compose run worker \
docker compose run worker \
sh

python-shell:
docker-compose run worker \
docker compose run worker \
poetry run flask 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'

migrations.blank: postgres.start
docker-compose run worker \
docker compose run worker \
poetry run flask db revision

migrations.create: postgres.start
docker-compose run worker \
docker compose run worker \
poetry run flask db migrate

migrations.upgrade: postgres.start
docker-compose run worker \
docker compose run worker \
poetry run flask db upgrade

migrations.heads: postgres.start
docker-compose run worker \
docker compose run worker \
poetry run flask db heads

0 comments on commit dd11249

Please sign in to comment.