feat: add svn preset management and optimize docker builds
This commit is contained in:
@@ -5,14 +5,14 @@
|
||||
# ============================================================
|
||||
DOCKER_REGISTRY_MIRROR ?= docker.1ms.run/library
|
||||
|
||||
.PHONY: up down status
|
||||
.PHONY: up down status fast-up
|
||||
|
||||
COMPOSE_CMD := $(shell if command -v docker >/dev/null 2>&1 && docker compose version >/dev/null 2>&1; then echo "docker compose"; elif command -v docker-compose >/dev/null 2>&1; then echo "docker-compose"; fi)
|
||||
BUILD_ENV := DOCKER_BUILDKIT=1 COMPOSE_DOCKER_CLI_BUILD=1
|
||||
|
||||
up:
|
||||
@if [ -z "$(COMPOSE_CMD)" ]; then echo "docker compose/docker-compose not found"; exit 1; fi
|
||||
@REGISTRY_MIRROR=$(DOCKER_REGISTRY_MIRROR) $(BUILD_ENV) $(COMPOSE_CMD) up -d --build
|
||||
@DOCKER_REGISTRY_MIRROR=$(DOCKER_REGISTRY_MIRROR) FAST_BUILD=false $(BUILD_ENV) $(COMPOSE_CMD) up -d --build
|
||||
@echo "Application is starting at http://localhost:18088"
|
||||
|
||||
down:
|
||||
@@ -23,3 +23,10 @@ status:
|
||||
@if [ -z "$(COMPOSE_CMD)" ]; then echo "docker compose/docker-compose not found"; exit 1; fi
|
||||
@$(BUILD_ENV) $(COMPOSE_CMD) ps
|
||||
@echo "Access URL: http://localhost:18088"
|
||||
|
||||
fast-up:
|
||||
@if [ -z "$(COMPOSE_CMD)" ]; then echo "docker compose/docker-compose not found"; exit 1; fi
|
||||
@echo "WARNING: fast-up is for Java incremental dev only."
|
||||
@echo "WARNING: Use 'make up' if you changed frontend resources, or deleted/renamed Java files."
|
||||
@DOCKER_REGISTRY_MIRROR=$(DOCKER_REGISTRY_MIRROR) FAST_BUILD=true $(BUILD_ENV) $(COMPOSE_CMD) up -d --build
|
||||
@echo "Application is starting at http://localhost:18088"
|
||||
|
||||
Reference in New Issue
Block a user