-
Notifications
You must be signed in to change notification settings - Fork 43
/
Copy pathMakefile.template
37 lines (26 loc) · 1.58 KB
/
Makefile.template
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
SNOWFLAKE_REPO?=<<repository_url>>
BACKEND_IMAGE=eap_backend
FRONTEND_IMAGE=eap_frontend
ROUTER_IMAGE=eap_router
help: ## Show this help.
@fgrep -h "##" $(MAKEFILE_LIST) | fgrep -v fgrep | sed -e 's/\\$$//' | sed -e 's/##//'
all: login build push
login: ## Login to Snowflake Docker repo
docker login $(SNOWFLAKE_REPO)
build: build_backend build_frontend build_router ## Build Docker images for Snowpark Container Services
build_backend: ## Build Docker image for backend for Snowpark Container Services
cd backend && docker build --platform linux/amd64 -t $(BACKEND_IMAGE) . && cd ..
build_frontend: ## Build Docker image for frontend for Snowpark Container Services
cd frontend && docker build --platform linux/amd64 -t $(FRONTEND_IMAGE) . && cd ..
build_router: ## Build Docker image for router for Snowpark Container Services
cd router && docker build --platform linux/amd64 -t $(ROUTER_IMAGE) . && cd ..
push: push_backend push_frontend push_router ## Push Docker images to Snowpark Container Services
push_backend: ## Push backend Docker image to Snowpark Container Services
docker tag $(BACKEND_IMAGE) $(SNOWFLAKE_REPO)/$(BACKEND_IMAGE)
docker push $(SNOWFLAKE_REPO)/$(BACKEND_IMAGE)
push_frontend: ## Push frontend Docker image to Snowpark Container Services
docker tag $(FRONTEND_IMAGE) $(SNOWFLAKE_REPO)/$(FRONTEND_IMAGE)
docker push $(SNOWFLAKE_REPO)/$(FRONTEND_IMAGE)
push_router: ## Push router Docker image to Snowpark Container Services
docker tag $(ROUTER_IMAGE) $(SNOWFLAKE_REPO)/$(ROUTER_IMAGE)
docker push $(SNOWFLAKE_REPO)/$(ROUTER_IMAGE)