Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 2 additions & 10 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -134,20 +134,12 @@ ps: ## List running containers

clean: ## Stop everything and remove named volumes (wipes the DB!)
$(COMPOSE) $(COMPOSE_DEV) down -v 2>/dev/null || true
$(COMPOSE) $(COMPOSE_PROD) down -v
$(COMPOSE) $(COMPOSE_PROD) down -v 2>/dev/null || true

fclean: clean ## Full clean: also remove certs and prune Docker images
rm -rf $(CERT_DIR)
rm -rf frontend/node_modules
@# backend/dist is a container artefact. The dev image runs as USER node
@# (uid 1000), so it lands owned by the host user and plain rm works.
@# Trees left by images built before that switch are root-owned and only
@# a container that *is* root can unlink them -- hence the fallback, which
@# also spares us re-pulling node:20-alpine after every prune -af below.
@# Leading '-': a missing daemon must not skip the prune below.
-rm -rf backend/dist backend/node_modules 2>/dev/null || \
docker run --rm -v $(CURDIR)/backend:/host:z node:20-alpine \
rm -rf /host/dist /host/node_modules
rm -rf backend/dist backend/node_modules
docker system prune -af

.PHONY: help env certs up down re dev dev-down migrate migrate-dev studio logs \
Expand Down