-
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathMakefile
29 lines (25 loc) · 824 Bytes
/
Makefile
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
## Defensive settings for make:
# https://tech.davis-hansson.com/p/make/
SHELL:=bash
.ONESHELL:
.SHELLFLAGS:=-xeu -o pipefail -O inherit_errexit -c
.SILENT:
.DELETE_ON_ERROR:
MAKEFLAGS+=--warn-undefined-variables
MAKEFLAGS+=--no-builtin-rules
IMAGE_NAME=ghcr.io/plone/quanta
IMAGE_TAG=latest
# We like colors
# From: https://coderwall.com/p/izxssa/colored-makefile-for-golang-projects
RED=`tput setaf 1`
GREEN=`tput setaf 2`
RESET=`tput sgr0`
YELLOW=`tput setaf 3`
.PHONY: build-image
build-image: ## Build Site Image
@echo "Building $(IMAGE_NAME):$(IMAGE_TAG)"
@docker buildx build . --progress=plain -t $(IMAGE_NAME):$(IMAGE_TAG) -f Dockerfile --load
.PHONY: run-image
run-image: ## Run Site Image
@echo "Running $(IMAGE_NAME):$(IMAGE_TAG) on port 8080"
@docker run -it -p 8080:80 $(IMAGE_NAME):$(IMAGE_TAG)