File size: 952 Bytes
5b50998
b8a625b
5b50998
 
24b25ab
5b50998
 
ef67a66
5b50998
 
24b25ab
5b50998
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
24b25ab
5b50998
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
# Variables
DOCKER_IMAGE_NAME = folding-studio-demo
DOCKER_IMAGE_TAG = latest
PORT = 7860
OUTPUT_DIR = ./output

# Docker build arguments
DOCKER_BUILD_ARGS = --build-arg FOLDING_PROJECT_CODE=${FOLDING_PROJECT_CODE}

# Docker run arguments
DOCKER_RUN_ARGS = -p $(PORT):$(PORT) -v $(OUTPUT_DIR):/app/output/html

# Default target
.DEFAULT_GOAL := help

# Help target
.PHONY: help
help:
	@echo "Available targets:"
	@echo "  build    - Build the Docker image"
	@echo "  run      - Run the Docker container"
	@echo "  clean    - Remove the Docker image"
	@echo "  help     - Show this help message"

# Build targets
.PHONY: build
build:
	docker build \
		$(DOCKER_BUILD_ARGS) \
		-t $(DOCKER_IMAGE_NAME):$(DOCKER_IMAGE_TAG) .

# Run targets
.PHONY: run
run:
	mkdir -p $(OUTPUT_DIR)
	docker run $(DOCKER_RUN_ARGS) $(DOCKER_IMAGE_NAME):$(DOCKER_IMAGE_TAG)

# Cleanup targets
.PHONY: clean
clean:
	docker rmi $(DOCKER_IMAGE_NAME):$(DOCKER_IMAGE_TAG) || true