diff --git a/Makefile b/Makefile index 18e180a..ce47f16 100644 --- a/Makefile +++ b/Makefile @@ -1,3 +1,5 @@ +COMPOSE:=docker-compose -p feedati + update: git submodule update @@ -5,15 +7,15 @@ fix-permissions: chmod -R 777 tt-rss/feed-icons/ tt-rss/cache/ tt-rss/lock/ build: fix-permissions - docker-compose build - docker-compose up -d + $(COMPOSE) build + $(COMPOSE) up -d $(eval DB_ID := $(shell docker ps -qf name=feedati_db)) @echo "[build] DB_ID = $(DB_ID)" await -t 5m postgres://ttrss:password-dev@localhost:5432/ttrss -- \ docker cp ./docker/ttrss.sql $$(docker ps -qf name=feedati_db):/tmp/ttrss.sql docker exec -t $$(docker ps -qf name=feedati_db) su -c "psql -d ttrss < /tmp/ttrss.sql" postgres docker exec -t $$(docker ps -qf name=feedati_db) rm -f /tmp/ttrss.sql - docker-compose stop + $(COMPOSE) stop rebuild-tt-rss: docker-compose build tt-rss @@ -24,13 +26,13 @@ rebuild-rss-bridge: rebuild: rebuild-tt-rss rebuild-rss-bridge run: fix-permissions - docker-compose up + $(COMPOSE) up clean: - docker container rm $$(docker container ls -a|grep feedati|awk '{print $$1}') + docker container rm $$(docker container ls -a --format '{{.ID}}\t{{.Names}}'|awk '$$2 ~ /feedati/ { print $$1 }') || true clean-all: clean - docker rmi $$(docker images|grep feedati|awk '{print $3}') || true + docker rmi $$( docker images | awk '$$1 ~ /^feedati\// { print $$3 }') || true docker volume rm feedati_postgres_data || true update-tt-rss: