initial import

This commit is contained in:
2025-11-20 14:59:04 +01:00
commit 4ee1ef0a81
12 changed files with 1392 additions and 0 deletions
+41
View File
@@ -0,0 +1,41 @@
# Makefile for building and running the POP3 to IMAP Importer Docker image
# Variables
IMAGE_NAME = pop-imap-importer
DOCKER_PLATFORM = linux/amd64
# Default target
.PHONY: help
help: ## Show this help message
@echo "Usage: make [target]"
@echo ""
@echo "Targets:"
@grep -E '^[a-zA-Z_-]+:.*?## .*$$' $(MAKEFILE_LIST) | sort | awk 'BEGIN {FS = ":.*?## "}; {printf "\033[36m%-20s\033[0m %s\n", $$1, $$2}'
.PHONY: build
build: ## Build the Docker image for linux/amd64 platform
docker build --platform=$(DOCKER_PLATFORM) -t $(IMAGE_NAME) .
.PHONY: run
run: ## Run the Docker container
docker run --platform=$(DOCKER_PLATFORM) --rm -it $(IMAGE_NAME)
.PHONY: run-with-env
run-with-env: ## Run the Docker container with a custom .env file
docker run --platform=$(DOCKER_PLATFORM) --rm -it -v $(PWD)/.env:/app/.env $(IMAGE_NAME)
.PHONY: clean
clean: ## Remove the Docker image
docker rmi $(IMAGE_NAME)
.PHONY: push
push: ## Push the Docker image to a registry (requires REPOSITORY variable)
ifndef REPOSITORY
$(error REPOSITORY is not set. Please set it with: make push REPOSITORY=your-repo/image-name)
endif
docker tag $(IMAGE_NAME) $(REPOSITORY):latest
docker push $(REPOSITORY):latest
.PHONY: shell
shell: ## Run a shell in the Docker container
docker run --platform=$(DOCKER_PLATFORM) --rm -it $(IMAGE_NAME) sh