-
Notifications
You must be signed in to change notification settings - Fork 2
/
Makefile
52 lines (41 loc) · 1.14 KB
/
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
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
# Carstatus build file.
#
# All commands necessary to go from development to release candidate should be here.
ROOT_DIR := $(patsubst %/,%,$(dir $(abspath $(lastword $(MAKEFILE_LIST)))))
# -----------------------------------------------------------------------------
# BUILD
# -----------------------------------------------------------------------------
.PHONY: all
all: build
.PHONY: build
build:
@docker build --file Dockerfile -t emazzotta/carstatus .
.PHONY: run
run:
@docker run --rm --env-file=.env emazzotta/carstatus
# -----------------------------------------------------------------------------
# DEVELOPMENT
# -----------------------------------------------------------------------------
.PHONY: bootstrap
bootstrap: build copy_env
.PHONY: copy_env
copy_env:
@cp .env.example .env
.PHONY: restart
restart: stop start
.PHONY: start
start:
@docker-compose up -d
.PHONY: stop
stop:
@docker-compose kill
.PHONY: force_build
force_build:
@docker-compose build --force-rm --no-cache --pull
.PHONY: clean
clean:
@rm -rf .cache
@rm -rf target
@rm -f .coverage
@find . -iname __pycache__ | xargs rm -rf
@find . -iname "*.pyc" | xargs rm -f