-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathMakefile
More file actions
27 lines (22 loc) · 817 Bytes
/
Copy pathMakefile
File metadata and controls
27 lines (22 loc) · 817 Bytes
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
DOCKER_IMAGE ?= mist-validation
FRONTEND_DIR = frontend
BACKEND_DIR = backend
STATIC_DIR = $(BACKEND_DIR)/app/frontend/static
INDEX_DIR = $(BACKEND_DIR)/app/frontend
.PHONY: angular clean docker all
# Build Angular frontend and copy output into the backend static directory
angular:
cd $(FRONTEND_DIR) && ng build --deploy-url static/
mkdir -p $(STATIC_DIR)
rm -rf $(STATIC_DIR)/*
cp $(FRONTEND_DIR)/dist/browser/browser/* $(STATIC_DIR)/
cp $(FRONTEND_DIR)/dist/browser/browser/index.html $(INDEX_DIR)/
# Build the Docker image (runs angular first)
docker: angular
docker buildx build --platform linux/amd64 -t tmunzer/mist-validation .
# Shorthand: build everything
all: docker
# Remove Angular build artifacts and copied static files
clean:
rm -rf $(FRONTEND_DIR)/dist
rm -rf $(STATIC_DIR)/*