forked from collective/training-deploy-project
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathMakefile
36 lines (30 loc) · 950 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
30
31
32
33
34
35
36
### 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
CURRENT_DIR:=$(shell dirname $(realpath $(lastword $(MAKEFILE_LIST))))
# 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-images
build-images: ## Build docker images
@echo "Build"
$(MAKE) -C "./backend/" build-image
$(MAKE) -C "./frontend/" build-image
.PHONY: release-images
release-images: build-images ## Build docker images
@echo "Release"
$(MAKE) -C "./backend/" release-image
$(MAKE) -C "./frontend/" release-image
.PHONY: start-images
start-images: ## Start docker compose
@echo "Build"
@docker-compose -f dockerfiles/local-dev.yml up --build